From d0a7ec169cbb3bf19024b6f9d337845e706b4fa2 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Fri, 7 Oct 2011 12:55:53 -0400 Subject: Make main into a function so we can profile it --- bin/chroma-sim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin/chroma-sim') 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() + -- cgit