mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 03:29:50 +00:00
Add user/system time to benchmark output
This commit is contained in:
parent
887ae6d898
commit
fad744c07f
1 changed files with 5 additions and 0 deletions
|
@ -1260,6 +1260,11 @@ class TestParsingPerformance (object):
|
|||
print "data parsed in %0.1f ms" % (diff * 1000.,)
|
||||
print "overall time spent: %0.1f s" % (time.time () - self.start_time,)
|
||||
|
||||
import resource
|
||||
rusage = resource.getrusage (resource.RUSAGE_SELF)
|
||||
print "time spent in user mode: %.2f s" % (rusage.ru_utime,)
|
||||
print "time spent in system mode: %.2f s" % (rusage.ru_stime,)
|
||||
|
||||
def main ():
|
||||
|
||||
if len (sys.argv) > 1 and sys.argv[1] == "benchmark":
|
||||
|
|
Loading…
Reference in a new issue