BenchDataTable.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:w4py 作者: Cito 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号