Skip to content

Inhibition Rules: Add benchmarks for Mutes #3772

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

Merged

Conversation

grobinson-grafana
Copy link
Collaborator

@grobinson-grafana grobinson-grafana commented Mar 21, 2024

This commit adds benchmarks for Mutes in the inhibit package. Here is an example of the benchmarks being run:

go test ./... -bench=.
goos: darwin
goarch: arm64
pkg: github.com/prometheus/alertmanager/inhibit
BenchmarkMutes/1_inhibition_rule,_1_inhibiting_alert-8         	 1498118	       778.2 ns/op
BenchmarkMutes/10_inhibition_rules,_1_inhibiting_alert-8       	 1528195	       784.1 ns/op
BenchmarkMutes/100_inhibition_rules,_1_inhibiting_alert-8      	 1364626	       797.3 ns/op
BenchmarkMutes/1000_inhibition_rules,_1_inhibiting_alert-8     	 1331232	       848.7 ns/op
BenchmarkMutes/10000_inhibition_rules,_1_inhibiting_alert-8    	 1314247	       841.0 ns/op
BenchmarkMutes/1_inhibition_rule,_10_inhibiting_alerts-8       	 1379548	       870.3 ns/op
BenchmarkMutes/1_inhibition_rule,_100_inhibiting_alerts-8      	  488551	      2188 ns/op
BenchmarkMutes/1_inhibition_rule,_1000_inhibiting_alerts-8     	   98607	     12039 ns/op
BenchmarkMutes/1_inhibition_rule,_10000_inhibiting_alerts-8    	   10754	    104250 ns/op
BenchmarkMutes/100_inhibition_rules,_1000_inhibiting_alerts-8  	  103459	     11382 ns/op
PASS
ok  	github.com/prometheus/alertmanager/inhibit	44.303s

This commit adds benchmarks for Mutes in the inhibit package.

Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
@grobinson-grafana grobinson-grafana force-pushed the grobinson/add-inhibit-benchmarks branch from 8d059d4 to 2d7ad7d Compare March 21, 2024 14:58
@grobinson-grafana grobinson-grafana changed the title Add benchmarks for Mutes Inhibition Rules: Add benchmarks for Mutes Mar 21, 2024
Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gotjosh gotjosh enabled auto-merge (squash) March 21, 2024 20:58
@gotjosh gotjosh merged commit f41fccb into prometheus:main Mar 21, 2024
th0th pushed a commit to th0th/alertmanager that referenced this pull request Mar 23, 2024
* Add benchmarks for Mutes

This commit adds benchmarks for Mutes in the inhibit package.

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
Signed-off-by: Gokhan Sari <[email protected]>
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