-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to pass multiple profiles which are merged in call to #99
base: master
Are you sure you want to change the base?
Conversation
pstat.Stats(). This is a common use case when multiple runs generate multiple '.prof' files, e.g. snakeviz prog1.*.prof When multiple profiles are passed, the "display_name" which is used for the browser tab name is changed to "Multiple profiles"
Various alternatives to passing the horrible URL are possible, including much fancier things like having the cli create a "fred.viz" file like Then the URL would be 127.0.0.1:8080/snakeviz/fred.viz - making a prettier URL and giving a place to store more state like color information or other stuff that annoying users request. |
Thanks for this PR, hope to give it a review soon! |
I realize that I have specific code using cProfile.run to generate uniquely named profile files. I use an environment variable to set a PROFILE_DIR to collect the dozens or hundreds of generated profile files. |
this function i also wanted. |
Hi, sorry for taking so long to review this! I love the idea, but looks like it now conflicts with work done on the cli in meantime, probably when support was added for listing directories. If you'd like to try to update this I'd love that, or if you'd like I can take a crack at implementing this feature. I think I would probably go about it by merging the profiles in a temporary file and then pointing snakeviz at that. How does that sound? |
This fell off my radar a while ago. I can look at my patch and see what I can do, but not any time too soon I think. Or you could think about the problem - the basic idea shouldn't be too hard duplicate. |
Why is this still in a review? This functionality is very much anticipated. |
Very sad that this functionality is still in development after 4 years. |
Anyone can approve this PR please? JUST MERGE IT, leave it to the community if you have no time!!! |
This change allows running snakeviz with multiple profiles. It simply concatenates the multiple profiles to the URL with a '&' separator, which is a bit of a hack and MAY fail with some browsers if a HUGE number of profiles is passed. But it works for me with testing on chrome and safari.