Improve daemon run profiling.

Review Request #4293 - Created Oct. 10, 2016 and submitted

Information
Kris Wilson
pants
3944
Reviewers
pants-reviews
nhoward_tw, stuhood, yujiec

This change adds a new PANTSD_PROFILE env var for profiling the daemon-side execution of a pants invocation and repairs PANTS_PROFILE in the daemon runner context with a deferred approach to calling os._exit() at the end of the forked child to permit the profiling data to be written to disk.

Combining these like so:

$ PANTSD_PROFILE=/tmp/daemon.prof PANTS_PROFILE=/tmp/runner.prof ./pants ...

will cause two profile dumps to be written representing the daemon-side and runner-side execution for more effective E2E profiling of daemon runs.

dogfooded this for the generated profiles in #3929 + CI is green here: https://travis-ci.org/pantsbuild/pants/builds/166878757

Issues

  • 0
  • 1
  • 0
  • 1
Description From Last Updated
Nick Howard (Twitter)
Kris Wilson
Yujie Chen
Nick Howard (Twitter)
Kris Wilson
Review request changed

Status: Closed (submitted)

Change Summary:

thanks Nick & Yujie! submitted @ f1bcf5d20502a1bd99211716fc2426dfb1268fec

Loading...