feat: timing + throughput metrics on Report (#144, #91)#244
Merged
Conversation
Report (snapshot semantics) gains: - StartedAt, Elapsed, TotalItemCount (init) — set by the producer. - ItemsPerSecond, PercentComplete, EstimatedRemaining — computed from the snapshot inputs so each report is internally consistent. Null/zero when the total is unknown (infinite/unknown-size sources). ExtractorBase / LoaderBase / TransformerBase auto-capture the start time and expose protected StartedAt + Elapsed (monotonic via Stopwatch.GetTimestamp, cross-TFM) on the first processed item, so derived CreateProgressReport implementations can surface them with no per-package boilerplate. Adds an internal IsExternalInit polyfill so the new init setters compile on net462/472/48/481 and netstandard2.0. MINOR (additive public API). PublicAPI.Shipped.txt regenerated. Verified: full Release build clean across all TFMs (0 warnings); 231 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 23, 2026
…age gate) The timing instrumentation (StartedAt/Elapsed/EnsureStarted) was added to all three base classes but only exercised on the extractor, dropping LoaderBase (88.8%) and TransformerBase (89%) under the 90% per-class coverage gate. Adds TimedLoader / TimedTransformer doubles with before/after StartedAt+Elapsed assertions, bringing all three base classes to 100% line coverage. 235 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 25, 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.
Adds timing and throughput metrics to
Report. Closes #144 and #91.MINOR (additive public API). The library is already released as v0.13.1, so this rolls into the next release as 0.14.0.
Report— new members (snapshot semantics)Producer-set (
init):StartedAt,Elapsed,TotalItemCount.Computed (derived from the snapshot, always internally consistent):
ItemsPerSecond=CurrentItemCount / ElapsedPercentComplete— [0,100] when total known (clamped), elsenullEstimatedRemaining— projected from throughput when total known,nullfor unknown-size/infinite sourcesPer #144's open question, timing is a snapshot captured at construction (consistent with
CurrentItemCount), not a live-updating value.Base classes — automatic timing
ExtractorBase/LoaderBase/TransformerBasecapture the start time on the first processed item and expose protectedStartedAt+Elapsed(monotonic viaStopwatch.GetTimestamp(), cross-TFM). DerivedCreateProgressReportimplementations can surface them with zero per-package boilerplate — which was the core motivation in #144 (every downstream report was reinventing "how long has this run").Notes
IsExternalInitpolyfill so the newinitsetters compile on net462/472/48/481 + netstandard2.0.TotalItemCountvalidates>= 0.PublicAPI.Shipped.txtregenerated (headless).Part of: #154