Skip to content

perf(tests): evaluate hour-scale promtool tests every hour - #4462

Merged
dan-petty merged 2 commits into
mainfrom
perf/4456-evaluate-hour-scale-promtool-tests-every-hour
Nov 11, 2026
Merged

dan-petty merged 2 commits into
mainfrom
perf/4456-evaluate-hour-scale-promtool-tests-every-hour

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The promtool case of the group roadmap-service-activity was the slowest test of the suite: 63.8 s on a CI runner and a median of 147 s in local gate logs. Its file evaluated the rules once each minute, but 7 of its 16 test groups run for 150 or 200 hours, so each made 9,000 to 12,000 rounds of the group.

  • The 7 hour-scale test groups move to roadmap_service_activity_hourly_tests.yaml with evaluation_interval: 1h. The cases do not change.
  • One rule group can have more than one file of promtool tests. A test that reads the files checks that the files of each group test every alert of it.
  • A guard test fails a promtool case of more than 1,000 rounds.

Closes #4456

Change: openspec/changes/archive/2026-11-11-4456-evaluate-hour-scale-promtool-tests-every/

The promtool case of roadmap-service-activity was the slowest test of the
suite: 63.8 s on a CI runner and a median of 147 s in local gate logs. Its
file evaluated the rules once each minute, but 7 of its 16 test groups run
for 150 or 200 hours, so each made 9,000 to 12,000 rounds.

The 7 hour-scale test groups move to their own file with
evaluation_interval 1h. One rule group can now have more than one file of
promtool tests. A test that reads the files checks that the files of each
group test every alert of it, and a guard test fails a case of more than
1,000 rounds.
@dan-petty dan-petty added type/infra Type infra: the build, CI, images or cluster scope/tests The test suite, its fixtures, fakes and floor labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Evidence for this change.

Fail-to-pass. The fail-to-pass check does not apply: the title is perf, and the change is all under tests/ and k8s/README.md, so the replay overlays the same tests/ tree on the base. In its place, the guard test against the fixture file of origin/main (copied back into the worktree for one run, then restored):

$ uv run pytest tests/prometheus/test_k8s_monitoring_alerting.py -n0 -k no_promtool_case_evaluates_more_rounds
FAILED ...::test_no_promtool_case_evaluates_more_rounds_than_the_budget[roadmap_service_activity_tests]
  Left contains 7 more items: 'A gauge sample 100 hours old still fires, ...': 12000.0, 'A new series with searches in its first flush stays quiet': 9000.0, ...
1 failed, 10 passed

With this branch: 21 passed for the guard and the test that the files of each group test every alert of it.

promtool 3.15.1, same host, load average 36 to 54 on 16 CPUs:

File Wall User CPU
roadmap_service_activity_tests.yaml of origin/main 298.9 s 141.1 s
roadmap_service_activity_tests.yaml of this branch 1.2 s 1.1 s
roadmap_service_activity_hourly_tests.yaml 2.1 s 2.1 s

All three print SUCCESS and exit 0. uv run devops ci test tests/prometheus/test_k8s_monitoring_alerting.py: 86 passed in 36 s.

Found by the measurement of #4405.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 03:09
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 03:09
@dan-petty
dan-petty merged commit 0ac2f76 into main Nov 11, 2026
31 checks passed
@dan-petty
dan-petty deleted the perf/4456-evaluate-hour-scale-promtool-tests-every-hour branch November 11, 2026 03:48
dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.111.0](v0.110.0...v0.111.0)
(2026-11-11)


### Features

* **roadmap:** a decision-point registry with a resolver chain
([#4453](#4453))
([b73e97a](b73e97a))
* **roadmap:** eval verify stores each case and resumes
([#4451](#4451))
([7c59565](7c59565))
* **roadmap:** extend a step budget when the run makes progress
([#4464](#4464))
([c8ed108](c8ed108))


### Bug Fixes

* **ai:** a failed model transport names its phase and its error
([#4460](#4460))
([54743c4](54743c4))
* **ai:** price the DeepSeek group and its cached input
([#4454](#4454))
([3b1f6bd](3b1f6bd))
* **roadmap:** stage and refine send no answer count or row
([#4484](#4484))
([d9c8ee8](d9c8ee8))
* **roadmap:** tool docstrings garble the answer format
([#4486](#4486))
([2f6114f](2f6114f))


### Performance Improvements

* **roadmap:** parse only the bodies that hold a job record
([#4455](#4455))
([c653bde](c653bde))
* **tests:** evaluate hour-scale promtool tests every hour
([#4462](#4462))
([0ac2f76](0ac2f76))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/tests The test suite, its fixtures, fakes and floor type/infra Type infra: the build, CI, images or cluster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(test): evaluate hour-scale promtool tests every hour

1 participant