Skip to content

Conversation

ringerc
Copy link
Contributor

@ringerc ringerc commented Aug 21, 2025

The --avalanche-flags-for-adjusted-series option requires you to input the total number of series to target. So it's not convenient to run mtypes once on a workload to say "just try to approximate its output for me".

The new --avalanche-flags will do just that, by using the computed series total as the input for the adjusted series target.

It's not super accurate for low counts, mainly because mtypes is hardcoded to --series-count=10 at the moment, but it has the same results as the --avalanche-flags-for-adjusted-series flag with the same total, which is all that was expected.

➜  mtypes git:(mtypes-adjusted-series) ✗ ./mtypes --avalanche-flags < exampleprometheustarget.txt
Metric Type    Metric Families    Series (adjusted)    Series (adjusted) %        Average Buckets/Objectives
GAUGE          76                 93 (93)              31.958763 (16.909091)      -
COUNTER        96                 157 (157)            53.951890 (28.545455)      -
HISTOGRAM      8                  14 (186)             4.810997 (33.818182)       11.285714
SUMMARY        15                 27 (114)             9.278351 (20.727273)       2.222222
---            ---                ---                  ---                        ---
*              195                291 (550)            100.000000 (100.000000)    -

Avalanche flags for the similar distribution to get to the adjusted series goal of: 291
--gauge-metric-count=4
--counter-metric-count=8
--histogram-metric-count=0
--histogram-metric-bucket-count=10
--native-histogram-metric-count=0
--summary-metric-count=1
--summary-metric-objective-count=2
--series-count=10
--value-interval=300
--series-interval=3600
--metric-interval=0
This should give the total adjusted series to: 160

vs

➜  mtypes git:(mtypes-adjusted-series) ✗ ./mtypes --avalanche-flags-for-adjusted-series=291 < exampleprometheustarget.txt
Metric Type    Metric Families    Series (adjusted)    Series (adjusted) %        Average Buckets/Objectives
GAUGE          76                 93 (93)              31.958763 (16.909091)      -
COUNTER        96                 157 (157)            53.951890 (28.545455)      -
HISTOGRAM      8                  14 (186)             4.810997 (33.818182)       11.285714
SUMMARY        15                 27 (114)             9.278351 (20.727273)       2.222222
---            ---                ---                  ---                        ---
*              195                291 (550)            100.000000 (100.000000)    -

Avalanche flags for the similar distribution to get to the adjusted series goal of: 291
--gauge-metric-count=4
--counter-metric-count=8
--histogram-metric-count=0
--histogram-metric-bucket-count=10
--native-histogram-metric-count=0
--summary-metric-count=1
--summary-metric-objective-count=2
--series-count=10
--value-interval=300
--series-interval=3600
--metric-interval=0
This should give the total adjusted series to: 160

The --avalanche-flags-for-adjusted-series option requires you to input
the total number of series to target. So it's not convenient to run
mtypes once on a workload to say "just try to approximate its output for
me".

The new --avalanche-flags will do just that, by using the computed
series total as the input for the adjusted series target.
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.

1 participant