refactor(sim): remove PreemptionProcessingTime from LatencyModel interface#555
Merged
sriumcp merged 1 commit intoinference-sim:mainfrom Mar 6, 2026
Conversation
…rface (inference-sim#554) Remove dead code: PreemptionProcessingTime() always returned 0 in all three backends, and PreemptionEvent was a no-op event type (Execute() only logged). The actual cost of preemption (re-prefill) is already modeled by the ProgressIndex=0 reset in batch formation. - Remove PreemptionProcessingTime() from LatencyModel interface (5→4 methods) - Remove PreemptionEvent type from event.go - Remove PreemptionDelay field from PreemptedRequest struct - Replace PreemptionEvent scheduling with inline logrus.Debugf - Preserve PreemptionCount++ metric and all preemption mechanics - Update docs: CLAUDE.md, core-engine.md, latency-models.md, extension-recipes.md, design-guidelines.md, doc.go, FINDINGS.md Fixes inference-sim#554 Co-Authored-By: Claude <[email protected]>
2438648 to
93f6401
Compare
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.
Summary
PreemptionProcessingTime()from theLatencyModelinterface (5→4 methods) — all three backends returned 0PreemptionEventtype — itsExecute()was a no-op (debug log only)PreemptionDelayfield fromPreemptedRequest— always carried value 0PreemptionEventscheduling with inlinelogrus.Debugf— preserves debug observabilityPreemptionCount++and all preemption mechanics (KV release, ProgressIndex reset, front-of-queue re-enqueue)Behavioral Contracts
Test plan
go build ./...— cleango test ./... -count=1— all 11 packages passgolangci-lint run ./...— 0 issuesFixes #554
🤖 Generated with Claude Code