common.py 文件源码

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

项目:utils 作者: jianbing 项目源码 文件源码
def profile_func(call_func_str):
    """?????????

        def f():
            d = AndroidDevice("192.168.1.120")
            d.swipe_position(650, 700, 50, 700, 30)
            d.swipe_position(130, 800, 850, 800, 50)

        profile_func("f()")

    :param call_func_str:
    :return:
    """
    import cProfile
    cProfile.run(call_func_str, "prof.txt")
    import pstats
    p = pstats.Stats("prof.txt")
    p.sort_stats("time").print_stats()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号