Repository navigation
fix: read duration header value when raw value is empty in loadgen - #21
Merged
Merged
Conversation
wrossmorrow
force-pushed
the
fix/loadgen-duration-extraction
branch
from
October 28, 2026 17:14
a2e67bb to
8b4b184
Compare
wrossmorrow
approved these changes
Oct 28, 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.
Summary
Fixes the LoadGen reporting
LoadGen: extproc duration avg=0.0ms (0 samples)when theextproc server is configured with
-Dextproc.update.duration_header=true.Investigation findings
The property wiring is fine. Reproduced locally: running the extproc server with
-Dextproc.update.duration_header=trueand driving it via the LoadGen results in the finalend-of-stream
ProcessingResponseactually carrying the duration header:The server-side option (
ProcessingOptions.updateDurationHeader, fed from-Dextproc.update.duration_header) and the header append inExternalProcessor.processPhasework correctly; the duration value (e.g.
2002666ns) is present and valid.The LoadGen extraction was the bug.
LoadGen.extractDurationNsrequired a non-emptyprotobuf
HeaderValue.rawValueand parsed raw bytes, but the SDK sets the duration viaHeaderValue.setValue(...)(seeRequestContext.updateHeader→HeaderValue.newBuilder() .setKey(name).setValue(value).build()), leavingrawValueas an emptyByteString. Theextraction therefore hit the
raw == null || raw.size() == 0 → return nullguard and droppedevery sample, producing
0 samples/avg=0.0ms.Fix
LoadGen.extractDurationNsnow falls back to the header's stringvaluewhenrawValueisempty (and vice versa), then parses the resulting duration value.
Verification
LoadGen: extproc duration avg=0.0ms (0 samples)→ After fix:LoadGen: extproc duration avg=1.2703613333333332ms (3 samples)(3 samples, real duration)../gradlew clean build— BUILD SUCCESSFUL (incl. spotless + tests).Closes the unresolved duration-tracking item from the earlier session notes.