Repository navigation
test(provider): fold #1100's benchmark iteration tests into #1096 - #1249
Open
brandon-eigenlabs wants to merge 1 commit into
Open
brandon-eigenlabs wants to merge 1 commit into
brandon-eigenlabs wants to merge 1 commit into
Conversation
…s into Layr-Labs#1096 Layr-Labs#1096 already introduces BenchmarkMeasurements with the complete Duration conversion. Layr-Labs#1100 added regression coverage for the standard benchmark's iteration arithmetic on top of an identical helper, so both PRs would add the same file. Carry Layr-Labs#1100's remaining pieces here instead: - extract ModelBenchmark.iterationResult, a pure function of the clock observations, so prefill, total and decode throughput can be tested without loading a model; - choose the prompt-time fallback by whether a first chunk arrived, not by prefillLatencyMs == 0; - test multi-second, sub-second and no-first-chunk iterations; - document the timing basis in the benchmark CLI reference. The whole-second truncation itself (Layr-Labs#770) was fixed by Layr-Labs#1030. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
brandon-eigenlabs
had a problem deploying
to
benchmarks
September 29, 2026 07:06 — with
GitHub Actions
Error
|
@brandon-eigenlabs is attempting to deploy a commit to the EigenLabs Team on Vercel. A member of the Team first needs to authorize it. |
17 of 25 tasks
This branch was successfully deployed
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.
Folds #1100's remaining changes into #1096 so the two PRs stop adding the same
BenchmarkMeasurements.swift. Targetsrefactor/tooling-consolidated(#1096's branch), not master. Merging this changes #1096 only; @Gajesh2007, it's yours to take or leave.Why
#1096 and #1100 each create
provider-swift/Sources/ProviderBenchmark/BenchmarkMeasurements.swiftwith an identicalmilliseconds(_:), so whichever merged second would conflict. #1096's version is a superset (it addsmeanandmedian). The whole-second truncation bug itself (#770) was already fixed on master by #1030. #1100 is regression coverage, and this carries that coverage over.What moves from #1100
ModelBenchmark.iterationResult: the iteration arithmetic (prefill, total, decode TPS) extracted as a pure function of the clock observations, so it is testable without loading a model.prefillLatencyMs == 0.Tests/ProviderCoreTests/Benchmark/ModelBenchmarkTests.swift: multi-second, sub-second and no-first-chunk cases.docs/provider/cli-reference.md(darkbloom benchmark) and a CHANGELOG line.#1096's own
BenchmarkMeasurementsand its tests are unchanged.Behavior
flowchart LR subgraph Before["Before (#1096 today)"] A1[first chunk?] -->|yes| B1[prefill = chunk time] A1 -->|no| C1[prefill = 0] C1 --> D1{prefill == 0?} B1 --> D1 D1 -->|yes| E1[prefill = info.promptTime] D1 -->|no| F1[decode TPS inline] E1 --> F1 end subgraph After A2[first chunk?] -->|yes| B2[prefill = chunk time] A2 -->|no| C2[prefill = info.promptTime] B2 --> F2[decode TPS] C2 --> F2 endCode
flowchart LR subgraph Before R1[runIteration] --> M1[BenchmarkMeasurements.milliseconds] R1 --> I1[inline BenchmarkIterationResult] end subgraph After R2[runIteration] --> I2[ModelBenchmark.iterationResult] I2 --> M2[BenchmarkMeasurements.milliseconds] T2[ModelBenchmarkTests] --> I2 endVerification
On #1096's head (
90e4138c9) plus this commit, Metal Toolchain installed, submodules at #1096's pins:swift build --build-testssucceeds.swift test --filter 'ModelBenchmark|BenchmarkMeasurements': 11 tests in 3 suites pass. That covers test(provider): guard standard benchmark duration arithmetic #1100's "standard model benchmark", Consolidate tooling, benchmark and E2E refactors #1096's "Benchmark measurement arithmetic" and the existingModelBenchmarkDispatchTests.scripts/docs-check.sh(312 files OK) anddocs-impact-checkagainst Consolidate tooling, benchmark and E2E refactors #1096's branch pass.The full provider suite was not run on this branch. If this is merged, #1100 can be closed.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.