Commit 6ceb38d
compile silence matchers when the silence is added (#4695)
* compile silence matchers when the silence is added
If QMatches doesn't update the map, multiple queries can execute
concurrently, with just a read lock. We have had this in production for
over a year, and it significantly improves performance for cases where
many silences need to be processed against many alerts.
This makes load time a bit slower, but a snapshot file with about
120.000 silences can still load in about 2 seconds, so we can accept
this, in exchange for the ability to run queries in parallel.
goos: linux
goarch: amd64
pkg: github.com/prometheus/alertmanager/cluster
cpu: AMD EPYC Processor (with IBPB)
│ bench-before.txt │ bench-after.txt │
│ sec/op │ sec/op vs base │
WriteTo-40 0.003794n ± ∞ ¹ 0.004227n ± ∞ ¹ ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05
│ bench-before.txt │ bench-after.txt │
│ B/op │ B/op vs base │
WriteTo-40 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
│ bench-before.txt │ bench-after.txt │
│ allocs/op │ allocs/op vs base │
WriteTo-40 0.000 ± ∞ ¹ 0.000 ± ∞ ¹ ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
pkg: github.com/prometheus/alertmanager/inhibit
│ bench-before.txt │ bench-after.txt │
│ sec/op │ sec/op vs base │
Mutes/1_inhibition_rule,_1_inhibiting_alert-40 1.248µ ± ∞ ¹ 1.340µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_inhibition_rules,_1_inhibiting_alert-40 1.298µ ± ∞ ¹ 1.326µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_1_inhibiting_alert-40 1.347µ ± ∞ ¹ 1.391µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_inhibition_rules,_1_inhibiting_alert-40 1.498µ ± ∞ ¹ 1.578µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_inhibition_rules,_1_inhibiting_alert-40 1.685µ ± ∞ ¹ 1.502µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_10_inhibiting_alerts-40 1.443µ ± ∞ ¹ 1.521µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_100_inhibiting_alerts-40 1.453µ ± ∞ ¹ 1.561µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_1000_inhibiting_alerts-40 1.423µ ± ∞ ¹ 1.511µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_10000_inhibiting_alerts-40 1.389µ ± ∞ ¹ 1.441µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_1000_inhibiting_alerts-40 1.218µ ± ∞ ¹ 1.306µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_inhibition_rules,_last_rule_matches-40 3.054µ ± ∞ ¹ 3.114µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_last_rule_matches-40 19.57µ ± ∞ ¹ 19.47µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_inhibition_rules,_last_rule_matches-40 187.4µ ± ∞ ¹ 188.9µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_inhibition_rules,_last_rule_matches-40 1.944m ± ∞ ¹ 1.955m ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 4.239µ 4.356µ +2.75%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05
│ bench-before.txt │ bench-after.txt │
│ B/op │ B/op vs base │
Mutes/1_inhibition_rule,_1_inhibiting_alert-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_inhibition_rules,_1_inhibiting_alert-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_1_inhibiting_alert-40 489.0 ± ∞ ¹ 489.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_inhibition_rules,_1_inhibiting_alert-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_inhibition_rules,_1_inhibiting_alert-40 489.0 ± ∞ ¹ 489.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_10_inhibiting_alerts-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_100_inhibiting_alerts-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_1000_inhibiting_alerts-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_10000_inhibiting_alerts-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_1000_inhibiting_alerts-40 488.0 ± ∞ ¹ 488.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_inhibition_rules,_last_rule_matches-40 472.0 ± ∞ ¹ 472.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_last_rule_matches-40 472.0 ± ∞ ¹ 472.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_inhibition_rules,_last_rule_matches-40 473.0 ± ∞ ¹ 473.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_inhibition_rules,_last_rule_matches-40 481.0 ± ∞ ¹ 481.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 484.2 484.2 +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
│ bench-before.txt │ bench-after.txt │
│ allocs/op │ allocs/op vs base │
Mutes/1_inhibition_rule,_1_inhibiting_alert-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_inhibition_rules,_1_inhibiting_alert-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_1_inhibiting_alert-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_inhibition_rules,_1_inhibiting_alert-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_inhibition_rules,_1_inhibiting_alert-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_10_inhibiting_alerts-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_100_inhibiting_alerts-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_1000_inhibiting_alerts-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1_inhibition_rule,_10000_inhibiting_alerts-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_1000_inhibiting_alerts-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_inhibition_rules,_last_rule_matches-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_inhibition_rules,_last_rule_matches-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_inhibition_rules,_last_rule_matches-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_inhibition_rules,_last_rule_matches-40 10.00 ± ∞ ¹ 10.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 10.00 10.00 +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
pkg: github.com/prometheus/alertmanager/matcher/parse
│ bench-before.txt │ bench-after.txt │
│ sec/op │ sec/op vs base │
ParseSimple-40 1.046µ ± ∞ ¹ 1.096µ ± ∞ ¹ ~ (p=1.000 n=1) ²
ParseComplex-40 4.855µ ± ∞ ¹ 4.769µ ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 2.254µ 2.286µ +1.45%
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05
│ bench-before.txt │ bench-after.txt │
│ B/op │ B/op vs base │
ParseSimple-40 232.0 ± ∞ ¹ 232.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
ParseComplex-40 2.602Ki ± ∞ ¹ 2.602Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 786.2 786.2 +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
│ bench-before.txt │ bench-after.txt │
│ allocs/op │ allocs/op vs base │
ParseSimple-40 7.000 ± ∞ ¹ 7.000 ± ∞ ¹ ~ (p=1.000 n=1) ²
ParseComplex-40 42.00 ± ∞ ¹ 42.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 17.15 17.15 +0.00%
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
pkg: github.com/prometheus/alertmanager/notify
│ bench-before.txt │ bench-after.txt │
│ sec/op │ sec/op vs base │
HashAlert-40 239.8n ± ∞ ¹ 244.2n ± ∞ ¹ ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05
│ bench-before.txt │ bench-after.txt │
│ B/op │ B/op vs base │
HashAlert-40 72.00 ± ∞ ¹ 72.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
│ bench-before.txt │ bench-after.txt │
│ allocs/op │ allocs/op vs base │
HashAlert-40 2.000 ± ∞ ¹ 2.000 ± ∞ ¹ ~ (p=1.000 n=1) ²
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
pkg: github.com/prometheus/alertmanager/silence
│ bench-before.txt │ bench-after.txt │
│ sec/op │ sec/op vs base │
Mutes/1_silence_mutes_alert-40 10.50µ ± ∞ ¹ 10.23µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_silences_mute_alert-40 12.15µ ± ∞ ¹ 13.85µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_silences_mute_alert-40 35.81µ ± ∞ ¹ 39.36µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_silences_mute_alert-40 430.7µ ± ∞ ¹ 474.4µ ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_silences_mute_alert-40 5.054m ± ∞ ¹ 5.211m ± ∞ ¹ ~ (p=1.000 n=1) ²
Query/100_silences-40 31.09µ ± ∞ ¹
Query/1000_silences-40 314.3µ ± ∞ ¹
Query/10000_silences-40 6.531m ± ∞ ¹
QueryParallel/100_silences,_1_goroutine-40 38.32µ ± ∞ ¹ 18.78µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_2_goroutines-40 37.57µ ± ∞ ¹ 17.50µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_4_goroutines-40 39.29µ ± ∞ ¹ 17.52µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_8_goroutines-40 37.88µ ± ∞ ¹ 18.83µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_1_goroutine-40 351.65µ ± ∞ ¹ 46.81µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_2_goroutines-40 335.03µ ± ∞ ¹ 44.99µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_4_goroutines-40 362.03µ ± ∞ ¹ 46.17µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_8_goroutines-40 338.11µ ± ∞ ¹ 46.33µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_1_goroutine-40 6979.9µ ± ∞ ¹ 354.1µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_2_goroutines-40 6454.0µ ± ∞ ¹ 363.8µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_4_goroutines-40 6607.6µ ± ∞ ¹ 346.9µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_8_goroutines-40 9666.4µ ± ∞ ¹ 409.3µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/1000_initial_silences,_10%_add_rate-40 493.8µ ± ∞ ¹ 154.1µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/1000_initial_silences,_1%_add_rate-40 373.19µ ± ∞ ¹ 70.64µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/1000_initial_silences,_0.1%_add_rate-40 358.16µ ± ∞ ¹ 49.32µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/10000_initial_silences,_1%_add_rate-40 7028.4µ ± ∞ ¹ 524.5µ ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/10000_initial_silences,_0.1%_add_rate-40 8035.2µ ± ∞ ¹ 374.5µ ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/100_silences,_4_goroutines-40 53.23µ ± ∞ ¹ 39.80µ ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/1000_silences,_4_goroutines-40 484.7µ ± ∞ ¹ 173.0µ ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/10000_silences,_4_goroutines-40 4.185m ± ∞ ¹ 1.112m ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/10000_silences,_8_goroutines-40 4.365m ± ∞ ¹ 1.077m ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 451.9µ 109.5µ -76.10% ³
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05
³ benchmark set differs from baseline; geomeans may not be comparable
│ bench-before.txt │ bench-after.txt │
│ B/op │ B/op vs base │
Mutes/1_silence_mutes_alert-40 3.835Ki ± ∞ ¹ 3.718Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_silences_mute_alert-40 6.740Ki ± ∞ ¹ 6.799Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_silences_mute_alert-40 35.99Ki ± ∞ ¹ 35.87Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_silences_mute_alert-40 308.2Ki ± ∞ ¹ 308.1Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_silences_mute_alert-40 3.536Mi ± ∞ ¹ 3.527Mi ± ∞ ¹ ~ (p=1.000 n=1) ²
Query/100_silences-40 6.142Ki ± ∞ ¹
Query/1000_silences-40 41.30Ki ± ∞ ¹
Query/10000_silences-40 525.2Ki ± ∞ ¹
QueryParallel/100_silences,_1_goroutine-40 6.052Ki ± ∞ ¹ 6.136Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_2_goroutines-40 6.048Ki ± ∞ ¹ 6.049Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_4_goroutines-40 6.048Ki ± ∞ ¹ 6.050Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_8_goroutines-40 6.053Ki ± ∞ ¹ 6.039Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_1_goroutine-40 41.30Ki ± ∞ ¹ 41.42Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_2_goroutines-40 41.27Ki ± ∞ ¹ 41.42Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_4_goroutines-40 41.32Ki ± ∞ ¹ 41.34Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_8_goroutines-40 41.29Ki ± ∞ ¹ 41.44Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_1_goroutine-40 525.0Ki ± ∞ ¹ 524.9Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_2_goroutines-40 524.9Ki ± ∞ ¹ 524.9Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_4_goroutines-40 524.9Ki ± ∞ ¹ 525.0Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_8_goroutines-40 525.0Ki ± ∞ ¹ 524.9Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/1000_initial_silences,_10%_add_rate-40 100.7Ki ± ∞ ¹ 226.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/1000_initial_silences,_1%_add_rate-40 61.88Ki ± ∞ ¹ 86.27Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/1000_initial_silences,_0.1%_add_rate-40 44.36Ki ± ∞ ¹ 46.04Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/10000_initial_silences,_1%_add_rate-40 1058.7Ki ± ∞ ¹ 533.3Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/10000_initial_silences,_0.1%_add_rate-40 1118.4Ki ± ∞ ¹ 525.1Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/100_silences,_4_goroutines-40 36.10Ki ± ∞ ¹ 36.05Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/1000_silences,_4_goroutines-40 307.6Ki ± ∞ ¹ 307.4Ki ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/10000_silences,_4_goroutines-40 3.487Mi ± ∞ ¹ 3.517Mi ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/10000_silences,_8_goroutines-40 3.492Mi ± ∞ ¹ 3.514Mi ± ∞ ¹ ~ (p=1.000 n=1) ²
geomean 94.43Ki 100.4Ki -0.98% ³
¹ need >= 6 samples for confidence interval at level 0.95
² need >= 4 samples to detect a difference at alpha level 0.05
³ benchmark set differs from baseline; geomeans may not be comparable
│ bench-before.txt │ bench-after.txt │
│ allocs/op │ allocs/op vs base │
Mutes/1_silence_mutes_alert-40 39.00 ± ∞ ¹ 39.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10_silences_mute_alert-40 59.00 ± ∞ ¹ 59.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/100_silences_mute_alert-40 158.0 ± ∞ ¹ 158.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/1000_silences_mute_alert-40 1.071k ± ∞ ¹ 1.071k ± ∞ ¹ ~ (p=1.000 n=1) ²
Mutes/10000_silences_mute_alert-40 10.18k ± ∞ ¹ 10.10k ± ∞ ¹ ~ (p=1.000 n=1) ³
Query/100_silences-40 45.00 ± ∞ ¹
Query/1000_silences-40 141.0 ± ∞ ¹
Query/10000_silences-40 1.051k ± ∞ ¹
QueryParallel/100_silences,_1_goroutine-40 42.00 ± ∞ ¹ 42.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_2_goroutines-40 42.00 ± ∞ ¹ 42.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_4_goroutines-40 42.00 ± ∞ ¹ 42.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/100_silences,_8_goroutines-40 42.00 ± ∞ ¹ 42.00 ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/1000_silences,_1_goroutine-40 138.0 ± ∞ ¹ 139.0 ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryParallel/1000_silences,_2_goroutines-40 138.0 ± ∞ ¹ 139.0 ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryParallel/1000_silences,_4_goroutines-40 138.0 ± ∞ ¹ 139.0 ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryParallel/1000_silences,_8_goroutines-40 138.0 ± ∞ ¹ 139.0 ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryParallel/10000_silences,_1_goroutine-40 1.049k ± ∞ ¹ 1.050k ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryParallel/10000_silences,_2_goroutines-40 1.049k ± ∞ ¹ 1.049k ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryParallel/10000_silences,_4_goroutines-40 1.049k ± ∞ ¹ 1.050k ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryParallel/10000_silences,_8_goroutines-40 1.049k ± ∞ ¹ 1.049k ± ∞ ¹ ~ (p=1.000 n=1) ²
QueryWithConcurrentAdds/1000_initial_silences,_10%_add_rate-40 400.0 ± ∞ ¹ 876.0 ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryWithConcurrentAdds/1000_initial_silences,_1%_add_rate-40 204.0 ± ∞ ¹ 294.0 ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryWithConcurrentAdds/1000_initial_silences,_0.1%_add_rate-40 175.0 ± ∞ ¹ 162.0 ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryWithConcurrentAdds/10000_initial_silences,_1%_add_rate-40 8.363k ± ∞ ¹ 1.065k ± ∞ ¹ ~ (p=1.000 n=1) ³
QueryWithConcurrentAdds/10000_initial_silences,_0.1%_add_rate-40 9.138k ± ∞ ¹ 1.052k ± ∞ ¹ ~ (p=1.000 n=1) ³
MutesParallel/100_silences,_4_goroutines-40 158.0 ± ∞ ¹ 158.0 ± ∞ ¹ ~ (p=1.000 n=1) ²
MutesParallel/1000_silences,_4_goroutines-40 1.073k ± ∞ ¹ 1.072k ± ∞ ¹ ~ (p=1.000 n=1) ³
MutesParallel/10000_silences,_4_goroutines-40 10.18k ± ∞ ¹ 10.10k ± ∞ ¹ ~ (p=1.000 n=1) ³
MutesParallel/10000_silences,_8_goroutines-40 10.16k ± ∞ ¹ 10.10k ± ∞ ¹ ~ (p=1.000 n=1) ³
geomean 380.8 366.0 -11.39% ⁴
¹ need >= 6 samples for confidence interval at level 0.95
² all samples are equal
³ need >= 4 samples to detect a difference at alpha level 0.05
⁴ benchmark set differs from baseline; geomeans may not be comparable
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
* Make 'get' private
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
* Add metrics for the case where the matches fails to compile/add to the cache
Before the silences would be in the status, but querying would result in
query errors. Now they are still in the status (since we have to
calculate after calling Merge), but we also know that some broken ones
exist.
At load snapshot time we can also avoid importing those, since they
would not be usable anyway, and we have different labels to distinguish
the cases/behaviors.
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
* Rename silenceAdded to cacheSilence
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
* Use matcherCompile.*Error metrics with pre-set labels
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
---------
Signed-off-by: Guido Trotter <guido@hudson-trading.com>
Co-authored-by: Guido Trotter <guido@hudson-trading.com>1 parent ce8ce3b commit 6ceb38d
2 files changed
+58
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 54 | + | |
| 55 | + | |
58 | 56 | | |
59 | 57 | | |
60 | 58 | | |
61 | | - | |
| 59 | + | |
62 | 60 | | |
63 | 61 | | |
64 | 62 | | |
| |||
217 | 215 | | |
218 | 216 | | |
219 | 217 | | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
276 | 285 | | |
277 | 286 | | |
278 | 287 | | |
| |||
313 | 322 | | |
314 | 323 | | |
315 | 324 | | |
| 325 | + | |
316 | 326 | | |
317 | 327 | | |
318 | 328 | | |
| |||
562 | 572 | | |
563 | 573 | | |
564 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
565 | 584 | | |
566 | 585 | | |
567 | 586 | | |
| |||
584 | 603 | | |
585 | 604 | | |
586 | 605 | | |
587 | | - | |
| 606 | + | |
588 | 607 | | |
589 | 608 | | |
590 | 609 | | |
| |||
738 | 757 | | |
739 | 758 | | |
740 | 759 | | |
741 | | - | |
| 760 | + | |
742 | 761 | | |
743 | 762 | | |
744 | 763 | | |
| |||
833 | 852 | | |
834 | 853 | | |
835 | 854 | | |
836 | | - | |
837 | | - | |
| 855 | + | |
| 856 | + | |
838 | 857 | | |
839 | 858 | | |
840 | 859 | | |
| |||
883 | 902 | | |
884 | 903 | | |
885 | 904 | | |
886 | | - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
887 | 912 | | |
888 | 913 | | |
889 | 914 | | |
| |||
933 | 958 | | |
934 | 959 | | |
935 | 960 | | |
936 | | - | |
| 961 | + | |
937 | 962 | | |
938 | 963 | | |
939 | 964 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
| |||
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
122 | | - | |
123 | | - | |
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | | - | |
152 | | - | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | | - | |
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
| |||
176 | 174 | | |
177 | 175 | | |
178 | 176 | | |
179 | | - | |
| 177 | + | |
180 | 178 | | |
181 | 179 | | |
182 | 180 | | |
| |||
192 | 190 | | |
193 | 191 | | |
194 | 192 | | |
195 | | - | |
196 | | - | |
| 193 | + | |
197 | 194 | | |
198 | 195 | | |
199 | 196 | | |
| |||
942 | 939 | | |
943 | 940 | | |
944 | 941 | | |
945 | | - | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
946 | 945 | | |
947 | 946 | | |
948 | 947 | | |
| |||
0 commit comments