diff options
author | Stan Seibert <stan@mtrr.org> | 2012-01-12 13:23:42 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:38 -0700 |
commit | 1167da9997adebd43a552a65bdfcd3d30fab4a68 (patch) | |
tree | da349eb4979e818f2da1502a9b6e5222e72fbd13 | |
parent | c1bbfb666306dff21cf153f62a55fd7e9aa744a1 (diff) | |
download | chroma-1167da9997adebd43a552a65bdfcd3d30fab4a68.tar.gz chroma-1167da9997adebd43a552a65bdfcd3d30fab4a68.tar.bz2 chroma-1167da9997adebd43a552a65bdfcd3d30fab4a68.zip |
Print events/second statistic in chroma-sim
-rwxr-xr-x | bin/chroma-sim | 3 |
1 files changed, 3 insertions, 0 deletions
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() |