コード例 #1
0
ファイル: commands.py プロジェクト: c0ns0le/cygwin
def apply_lsprofiled(filename, the_callable, *args, **kwargs):
    from bzrlib.lsprof import profile
    ret, stats = profile(the_callable, *args, **kwargs)
    stats.sort()
    if filename is None:
        stats.pprint()
    else:
        stats.save(filename)
        trace.note('Profile data written to "%s".', filename)
    return ret
コード例 #2
0
def apply_lsprofiled(filename, the_callable, *args, **kwargs):
    from bzrlib.lsprof import profile
    ret, stats = profile(the_callable, *args, **kwargs)
    stats.sort()
    if filename is None:
        stats.pprint()
    else:
        stats.save(filename)
        trace.note('Profile data written to "%s".', filename)
    return ret
コード例 #3
0
def _collect_stats():
    "Collect and return some dummy profile data."
    from bzrlib.lsprof import profile
    ret, stats = profile(_junk_callable)
    return stats
コード例 #4
0
ファイル: test_lsprof.py プロジェクト: Distrotech/bzr
def _collect_stats():
    "Collect and return some dummy profile data."
    from bzrlib.lsprof import profile
    ret, stats = profile(_junk_callable)
    return stats