My workload runs for hours – can Zoom profile that long?
Yes, Zoom can profile for long periods. With the default profiling configs, Zoom will initially begin profiling with parameters that are optimized for profiles of up to a few minutes. After a large number of samples have been taken, Zoom will dynamically increase the sampling interval for longer profiles. This is called “Adaptive Sampling” and is designed to keep the total sample count manageable. A statistical profile of a few thousand samples is almost always as representative as a profile of a few billion samples. This is because we’re interested in optimizing the portion of the code that executes for a significant amount of the overall time. Optimizing code that accounts for a small fraction of the time has a high development cost but offers little benefit. You can override Adaptive Sampling in any Zoom profiling configuration, but we generally advise against doing that.