From 1167da9997adebd43a552a65bdfcd3d30fab4a68 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Thu, 12 Jan 2012 13:23:42 -0500 Subject: Print events/second statistic in chroma-sim --- bin/chroma-sim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'bin/chroma-sim') diff --git a/bin/chroma-sim b/bin/chroma-sim index 6ab014e..854817a 100755 --- a/bin/chroma-sim +++ b/bin/chroma-sim @@ -11,6 +11,7 @@ def main(): import inspect import numpy as np import itertools + import time from chroma import event from chroma import itertoolset @@ -102,6 +103,7 @@ def main(): writer = root.RootWriter(options.output_filename) + start = time.time() for i, ev in \ enumerate(sim.simulate(itertools.islice(ev_gen, options.nevents), @@ -116,6 +118,7 @@ def main(): print writer.close() + print 'Events per second: %1.1f' % (options.nevents / (time.time() - start)) if __name__ == '__main__': main() -- cgit