Created
October 30, 2015 14:16
-
-
Save rawdigits/038c4d001238d9b52a5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = cProfile.Profile() | |
p.enable() | |
counter = 1 | |
def profiler_write_cb(data, remaining): | |
global counter, p | |
p.dump_stats('/tmp/stats/asdf_{}'.format(counter)) | |
p.enable() | |
counter += 1 | |
return w.WEECHAT_RC_OK | |
w.hook_timer(1000 * 5, 0, 0, "profiler_write_cb", “") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment