Improve daemon run profiling.

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

Kris Wilson
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/ PANTS_PROFILE=/tmp/ ./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:


  • 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