Skip to content
This repository has been archived by the owner on Aug 24, 2020. It is now read-only.

dump method of Profiler class is missing in pypi #51

Open
MJ111 opened this issue Oct 8, 2018 · 1 comment
Open

dump method of Profiler class is missing in pypi #51

MJ111 opened this issue Oct 8, 2018 · 1 comment

Comments

@MJ111
Copy link
Contributor

MJ111 commented Oct 8, 2018

https://pypi.org/project/profiling/#files

could you download this and check profiler.py?
there's no dump method in there.

for some reason, there's mismatch between github master branch and latest pypi package.

@sinanm89
Copy link

sinanm89 commented Oct 11, 2019

yep, this is still the case.
Ive included this snippet inside my code so dump works (copied+modified from the source);

import pickle

def dump(profiler, filename, pickle_protocol=pickle.HIGHEST_PROTOCOL):
    result = profiler.result()
    with open(filename, 'wb') as f:
        pickle.dump((profiler.__class__, result), f, pickle_protocol)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants