mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5307] [CLOSED] [Engine] Count batch admission and slot decode work exactly once #5380
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5380
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/5307
Author: @shoucandanghehe
Created: 11/5/2026
Status: ❌ Closed
Base:
main← Head:upstream/batch-leg-accounting📝 Commits (2)
08519d4Serving metrics: count admission and slot decode work exactly onced4a0db4Serving tests: simplify batch accounting regressions📊 Changes
3 files changed (+131 additions, -20 deletions)
View changed files
📝
serve/server.py(+30 -14)📝
serve/test_parallel.py(+82 -5)📝
serve/test_request_accounting.py(+19 -1)📄 Description
Problem
A batch request reports an admission
DONEfollowed by a slotBDONE. The slot’s token count includes the admission token, but its duration covers only the slot phase. The server currently replaces the admission duration with the slot duration.For example, a 20 ms admission followed by a slot report of 10 total tokens / 1 ms should be recorded as 10 tokens / 21 ms.
Requests interrupted before final slot statistics arrive can also publish incomplete work as complete totals.
Fix
Related: #1869.
Validation
Tested
d4a0db48on Linux/WSL2, Python 3.14.4, using the real server with a subprocess fake native engine.All 120 tests passed. The seven retained regressions fail against the unpatched server. They cover completion, interruption, zero slot duration and accounting across continuations.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.