JuliaPerf / PProf.jl

Export Julia profiles to the pprof format
MIT License
155 stars 17 forks source link

Comparing profiles #23

Open cscherrer opened 4 years ago

cscherrer commented 4 years ago

This looks really useful: https://github.com/google/pprof/blob/master/doc/README.md#comparing-profiles

Any experience using PProf in this way? I'm not sure what the most natural interface would be, maybe something allowing code to be run at two different commits? Or maybe the code executed should be allowed to change too, to account for interface updates?

vchuravy commented 4 years ago

I am unsure that there is a good interface on our side, but you can always use

pprof(web=false, out=profile1.pb.gz)

To safe a particular profile and compare against it later.

NHDaly commented 4 years ago

Yeah, i've done what @vchuravy suggested.

I see two paths that could make this easier:

  1. We could probably support a diffbase flag, that lets you then point to the profile you exported via valentin's suggestion above.
  2. We could maybe provide a more convenient function to run the embedded pprof binary with arbitrary commands, so that you could do that yourself? Right now, we do this awkward thing internally, and we could instead make a nice function for this?: https://github.com/vchuravy/PProf.jl/blob/e142c4cab70cc51a9c50b0a12aac61dc59ff1090/src/PProf.jl#L259-L261