def main(self):
if len(sys.argv) > 1 and sys.argv[1].lower().startswith('prof'):
self._shouldProfile = True
if self._shouldRunTestSuite:
from TestDataTable import main
main()
start = time.time()
if self._shouldProfile:
prof = Profile()
prof.runcall(self._main)
filename = '%s.pstats' % self.__class__.__name__
prof.dump_stats(filename)
print 'Wrote', filename
else:
self._main()
duration = time.time() - start
print '%.1f secs' % duration
评论列表
文章目录