cooker.py 文件源码

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

项目:isar 作者: ilbers 项目源码 文件源码
def server_main(cooker, func, *args):
    cooker.pre_serve()

    if cooker.configuration.profile:
        try:
            import cProfile as profile
        except:
            import profile
        prof = profile.Profile()

        ret = profile.Profile.runcall(prof, func, *args)

        prof.dump_stats("profile.log")
        bb.utils.process_profilelog("profile.log")
        print("Raw profiling information saved to profile.log and processed statistics to profile.log.processed")

    else:
        ret = func(*args)

    cooker.post_serve()

    return ret
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号