Home | Trees | Indices | Help |
---|
|
1 # -*- coding: utf-8 -*- 2 # Elisa - Home multimedia server 3 # Copyright (C) 2006-2008 Fluendo Embedded S.L. (www.fluendo.com). 4 # All rights reserved. 5 # 6 # This file is available under one of two license agreements. 7 # 8 # This file is licensed under the GPL version 3. 9 # See "LICENSE.GPL" in the root of this distribution including a special 10 # exception to use Elisa with Fluendo's plugins. 11 # 12 # The GPL part of Elisa is also available under a commercial licensing 13 # agreement from Fluendo. 14 # See "LICENSE.Elisa" in the root directory of this distribution package 15 # for details on that license. 16 17 18 __maintainer__ = 'Florian Boucault <florian@fluendo.com>' 19 2022 import hotshot 23 import hotshot.stats 24 25 def _my(func): 26 def _func(*args, **kargs): 27 prof = hotshot.Profile("profiling.data") 28 res = prof.runcall(func, *args, **kargs) 29 prof.close() 30 stats = hotshot.stats.load("profiling.data") 31 stats.strip_dirs() 32 #stats.sort_stats('cumul', 'calls') 33 #stats.sort_stats('calls', 'cumul') 34 stats.sort_stats('time', 'calls') 35 print ">>>---- Begin profiling print" 36 stats.print_stats(printlines) 37 print ">>>---- End profiling print" 38 return res39 return _func 40 return _my 41
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0beta1 on Wed Jan 16 19:10:33 2008 | http://epydoc.sourceforge.net |