Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i#6938 migrate: Include sched stats in query and fix related assert #7060

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

derekbruening
Copy link
Contributor

schedule_stats_t::get_total_counts() was not including scheduler-provided stats, as it was doing its own simple aggregation instead of calling aggregate_results(). We fix that here. That then triggers the newly added assert from PR #7057 which checks for the scheduler-provided value being exactly equal meaning there is no data available. It fires on the schedule_stats_test, which uses a mock stream which returns -1 for such a stat, so we end up with a negative value. We update the assert for that condition.

Issue: #6938

schedule_stats_t::get_total_counts() was not including
scheduler-provided stats, as it was doing its own simple aggregation
instead of calling aggregate_results().  We fix that here.  That then
triggers the newly added assert from PR #7057 which checks for the
scheduler-provided value being exactly equal meaning there is no data
available.  It fires on the schedule_stats_test, which uses a mock
stream which returns -1 for such a stat, so we end up with a negative
value.  We update the assert for that condition.

Issue: #6938
@derekbruening
Copy link
Contributor Author

It maybe isn't ideal that the -1 returned by the mock ends up being summed across cores to get an even more negative integer: but changing to 0 also seems misleading. This is only for unit tests so probably it's ok.

@derekbruening
Copy link
Contributor Author

I did think about whether it was simple to add tests of get_total_counts() where there was a real schedule and no mock: but that would require maybe a mock separate tool that's run on a live schedule? Decided it was not worth it when the bulk of what it does is covered by the regular tests.

@derekbruening derekbruening merged commit b88a389 into master Oct 29, 2024
17 checks passed
@derekbruening derekbruening deleted the i6938-migration-assert branch October 29, 2024 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants