ns::stats::Sampler method calculate (public)
<instance of ns::stats::Sampler> calculate current previous \ interval instance
Derive interval diagnostics from current and previous snapshots. Return the current observations augmented with counter deltas, rates, average request phase times and thread CPU percentages. Rates use measured elapsed time; interval records the configured sampling cadence, and instance identifies the sampler lifetime. Interval results require a previous snapshot from the same process lifetime and positive elapsed time. Missing baselines or decreased counters yield empty derived values. CPU comparisons match thread identifiers and creation times; percentages use one core as 100%. Does not collect observations or modify shared state.
- Parameters:
- current (required)
- previous (required)
- interval (required)
- instance (required)
- Testcases:
- No testcase defined.
![[i]](/resources/acs-subsite/ZoomIn16.gif)