From: Pierre-Marc Fournier Date: Mon, 17 May 2010 16:53:19 +0000 (-0400) Subject: add missing ptime for benchmark X-Git-Tag: v1.9.1~601 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c80a4aaefb80e2f43ac474aeda2ce8db45e12799;p=lttng-ust.git add missing ptime for benchmark --- diff --git a/tests/benchmark/ptime b/tests/benchmark/ptime new file mode 100755 index 00000000..8e22c02a --- /dev/null +++ b/tests/benchmark/ptime @@ -0,0 +1,22 @@ +#!/usr/bin/python + +import sys +import time +import os + +def main(): + args = sys.argv[1:] + if len(args) < 1: + print "usage: %s COMMAND" % sys.argv[0] + sys.exit(1) + + cmd = args[0] + + t1 = time.time() + os.system(cmd) + 1 + t2 = time.time() + + print (t2-t1) + +main()