Repository navigation
perf: skip unused live metric computations - #53
Merged
Merged
Conversation
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
Try out this PRQuick install: pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@234bed113ddfa7753b2a3125af35f6aa966e0c78Recommended with virtual environment (using uv): uv venv --python 3.12 && source .venv/bin/activate
uv pip install --upgrade --force-reinstall git+https://github.com/ai-dynamo/aiperf.git@234bed113ddfa7753b2a3125af35f6aa966e0c78Last updated for commit: |
|
Fern Docs Preview: generation failed — see the Actions log for details. This does not block merge; ask a maintainer to retry if needed. |
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
Signed-off-by: Cam Quilici <cjquilici@gmail.com>
This was referenced Oct 19, 2026
3 of 4 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Live metric updates rebuild per-second request statistics that the live consumer discards. AgentX also builds sweep curves for 14 metrics absent from its ordinary progress log. Both calculations block record ingestion while they run.
Reserve request timeslices for final exports. For the
agentxscenario with a non-dashboard UI, also skip sweep curves during live summaries. Interactive dashboards, other scenarios' sweep metrics, and final reports retain the full calculations. No new user-facing setting is added.AgentX progress-log values and server-metric time series are unchanged. Non-dashboard AgentX realtime metric messages, including those consumed by live API subscribers, omit the 14 sweep metrics; final exports still contain them.
Note
Medium Risk
Changes live metric payloads for non-dashboard AgentX (14 fewer sweep tags in realtime/API) while altering the hot summarize path; final exports and dashboard behavior are preserved by design.
Overview
Live request-metric updates no longer compute per-timeslice buckets or, in some AgentX runs, sweep curves.
MetricsAccumulator.summarize()now passesinclude_timeslices=Falseinto_summarize_for_export_context, so rolling dashboards and progress logs only get overall aggregates; timeslicing stays onexport_results()for final exports and plots.For
agentxwith a non-dashboard UI, live summaries also setinclude_sweeps=False, skipping the 14 effective/active sweep metrics that the ordinary progress log does not display. Dashboard AgentX, other scenarios, and all final exports still run full sweep and timeslice work. Architecture docs andAccumulatorMetricsSummarydocstrings describe this split.Unit tests that asserted timeslice behavior now call
export_results(ExportContext())instead ofsummarize(). A new realtime test patches_compute_timeslices/compute_sweep_curvesto prove the live path skips that work while export output stays unchanged.Reviewed by Cursor Bugbot for commit 234bed1. Bugbot is set up for automated code reviews on this repo. Configure here.