-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
profiler: start collecting profiles immediately (#1417)
Previously, it would take two minutes for the first profile to be uploaded. One minute for the internal time.Ticker to fire, and then an additional minute to collect the profiles for the first time. This means we wouldn't get profiles for the first minute of activity. Two tests had to be changed due to this: * TestStartStopIdempotency became significantly slower, because it would start 5000 profiles, and stopping each one involved waiting 200 ms for the CPU profile to stop. Changed to just collect the heap profile and to do fewer iterations. * TestProfilerInternal broke because it expected one round of profiling to happen after the "ticker" fired, but now one happens sooner so you see multiple profiles. It also broke because the test was supposed to close p.exit, not send to it. In general, the test is too tied to the specific implementation. TestAllUploaded covers all the same behavior and more, and didn't get broken by this implementation change. So I opted to just delete TestProfilerInternal.
- Loading branch information
Showing
2 changed files
with
69 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters