projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build system: implement REUSE with SPDX identifiers
[lttng-ust.git]
/
tests
/
benchmark
/
ptime
diff --git
a/tests/benchmark/ptime
b/tests/benchmark/ptime
index 8e22c02a15256f5eed1ef26125f49fb597f27337..0413b94d132b29ca06accbedeadbf674de9d684b 100755
(executable)
--- a/
tests/benchmark/ptime
+++ b/
tests/benchmark/ptime
@@
-1,4
+1,6
@@
-#!/usr/bin/python
+#!/usr/bin/env python
+#
+# SPDX-License-Identifier: LGPL-2.1-only
import sys
import time
import sys
import time
@@
-7,16
+9,16
@@
import os
def main():
args = sys.argv[1:]
if len(args) < 1:
def main():
args = sys.argv[1:]
if len(args) < 1:
- print
"usage: %s COMMAND" % sys.argv[0]
+ print
("usage: %s COMMAND" % sys.argv[0])
sys.exit(1)
sys.exit(1)
- cmd =
args[0]
+ cmd =
' '.join(args)
t1 = time.time()
os.system(cmd)
t1 = time.time()
os.system(cmd)
- 1
t2 = time.time()
t2 = time.time()
- print
(t2-t1
)
+ print
("Wall time: " + str(t2-t1)
)
-main()
+if __name__ == "__main__":
+ main()
This page took
0.033424 seconds
and
4
git commands to generate.