Add ETW session loss metrics integration tests#312
Merged
beaubelgrave merged 1 commit intoJul 21, 2026
Conversation
Adds two end-to-end integration tests for query_stats / SessionStats in one_collect/tests/etw_stats_integration.rs: a healthy draining consumer asserting zero loss (and off-thread query access), and a blocked consumer under a write flood asserting loss invariants (observed, non-decreasing, strictly increasing). Both are #[ignore]d since the ETW consumer side requires elevation. Wires the tests into CI by consolidating the existing TDH integration job and the new stats tests into a single windows-latest job (integration_etw_windows_x64) that runs each binary with --ignored --test-threads=1, elevated as runneradmin.
utpilla
force-pushed
the
utpilla/add-etw-stats-integration-tests
branch
from
July 20, 2026 23:43
2fdae1d to
08f7c5d
Compare
utpilla
marked this pull request as ready for review
July 20, 2026 23:46
beaubelgrave
approved these changes
Jul 21, 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.
Changes
Adds two end-to-end integration tests for the ETW session loss metrics API (
one_collect::etw::query_stats/SessionStats) in a new file,etw_stats_integration.rs.query_stats_reports_zero_loss_for_healthy_session: a draining consumer with default buffers must not drop anything, so the test asserts the deterministic zero case (events_lost == 0,real_time_buffers_lost == 0). Also exercisesquery_statsfrom a separate spawned thread to confirm off-thread access via theSendhandle.query_stats_observes_loss_under_blocked_consumer: blocks theProcessTraceconsumer on its first event while a writer floods events into tiny buffers, making loss inevitable. Asserts only hardware-independent invariants: loss is observed (> 0), the counter is non-decreasing across polls, and additional writes driveevents_loststrictly higher.