Include cached token metrics in Integration Test Average Token Usage dashboard panel - #2189
Merged
JasonYeMSFT (JasonYeMSFT) merged 2 commits intoMay 8, 2026
Conversation
Agent-Logs-Url: https://github.com/microsoft/GitHub-Copilot-for-Azure/sessions/8e95e6ee-57d0-4f05-8884-7c3393da7da7 Co-authored-by: tmeschter <10506730+tmeschter@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update integration test average token usage to include cached counts
Include cached token metrics in Integration Test Average Token Usage dashboard panel
May 7, 2026
Tom Meschter (tmeschter)
approved these changes
May 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the dashboard’s “Integration Test Average Token Usage” panel so per-test averages include cache read/write token counts, improving visibility into cache-driven costs during integration runs.
Changes:
- Extended integration token usage row construction to compute
cacheReadTokensandcacheWriteTokensper-run averages. - Updated the panel rendering to display
In / Out / Cache Read / Cache Write / Totaland added new DOM spans for the cache metrics. - Added CSS styling for the new cache token spans and introduced a focused dashboard test asserting the new fields/header are present.
Show a summary per file
| File | Description |
|---|---|
| scripts/src/dashboard/tests/integration-token-usage.test.ts | Adds a regression test that asserts cached token metrics are included in row construction and rendered in the table. |
| dashboard/assets/style.css | Extends muted styling to the new cache token metric spans. |
| dashboard/assets/dashboard.js | Computes per-test cached token averages and renders cache read/write alongside existing token metrics in the panel. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 2
Sai Koumudi Kaluvakolanu (saikoumudi)
approved these changes
May 8, 2026
JasonYeMSFT (JasonYeMSFT)
approved these changes
May 8, 2026
JasonYeMSFT (JasonYeMSFT)
deleted the
copilot/update-integration-test-average-token-usage
branch
May 8, 2026 17:13
This was referenced May 8, 2026
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.
The Integration Test Average Token Usage panel only surfaced input/output/total tokens, which hid cache-driven cost signals. This update adds cached token counts to the panel’s per-test averages and display so token usage is more representative.
Dashboard token aggregation
cacheReadTokenscacheWriteTokenstotalTokens.Panel table rendering
In / Out / Totalto:In / Out / Cache Read / Cache Write / TotalStyling + regression coverage