summaryrefslogtreecommitdiff
path: root/bin/chroma-sim
diff options
context:
space:
mode:
authorStan Seibert <stan@mtrr.org>2011-10-07 12:55:53 -0400
committerStan Seibert <stan@mtrr.org>2011-10-07 12:55:53 -0400
commitd0a7ec169cbb3bf19024b6f9d337845e706b4fa2 (patch)
tree0ed9afa166fbd014209bb0fc0fee0dff0f3ba6cf /bin/chroma-sim
parentb264fdd62fc2e641973774dfef99e36d90f21a27 (diff)
downloadchroma-d0a7ec169cbb3bf19024b6f9d337845e706b4fa2.tar.gz
chroma-d0a7ec169cbb3bf19024b6f9d337845e706b4fa2.tar.bz2
chroma-d0a7ec169cbb3bf19024b6f9d337845e706b4fa2.zip
Make main into a function so we can profile it
Diffstat (limited to 'bin/chroma-sim')
-rwxr-xr-xbin/chroma-sim7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/chroma-sim b/bin/chroma-sim
index 7f309de..5454ce3 100755
--- a/bin/chroma-sim
+++ b/bin/chroma-sim
@@ -1,7 +1,9 @@
#!/usr/bin/env python
#--*-python-*-
+from chroma.tools import profile_if_possible
-if __name__ == '__main__':
+@profile_if_possible
+def main():
import optparse
import sys
import imp
@@ -109,3 +111,6 @@ if __name__ == '__main__':
writer.close()
+if __name__ == '__main__':
+ main()
+