Due to a quirk (?) in linear histograms, if you want a histogram with a single bucket for each value in 1..N, you need to declare it:
HISTOGRAM(NAME, 1, N, N+1, LINEAR, EXPLANATION)
HISTOGRAM(NAME, 1, N, N, LINEAR, EXPLANATION)
because you need to account for the implicit zero bucket at the bottom.
This has come up a couple times for new histograms, and at least GC_REASON seems to suffer from a wrong declaration. SSL telemetry was/is going to use histograms like this, too.
Created attachment 604111 [details] [diff] [review]
The dead simple patch. Bikeshedding about the name welcome.
Histograms that could benefit from this macro:
CACHE_*_SEARCH (odd to have a linear histogram for ms histogram, especially one so finely bucketed)
but most of those would involve a small tweak to the histogram (either in # of buckets or upper bound); doesn't seem worth the effort
Comment on attachment 604111 [details] [diff] [review]
HISTOGRAM_SINGLE_VALUE_BUCKET is the best you can come up with? How about HISTOGRAM_CONTINUOUS?
HISTOGRAM_CONTINUOUS doesn't sound right. HISTOGRAM_ENUMERATED_VALUES (since most people seem to be sticking enums in these anyway)?
(In reply to Nathan Froyd (:froydnj) from comment #4)
> HISTOGRAM_CONTINUOUS doesn't sound right. HISTOGRAM_ENUMERATED_VALUES
> (since most people seem to be sticking enums in these anyway)?
Created attachment 606203 [details] [diff] [review]
Use HISTOGRAM_ENUMERATED_VALUES. Adding r+ per Taras's earlier comment.
Branch: mozilla-central => try
Try run started, revision a9acecdb826d. To cancel or monitor the job, see: https://tbpl.mozilla.org/?tree=Try&rev=a9acecdb826d
Try run for a9acecdb826d is complete.
Detailed breakdown of the results available here:
Results (out of 14 total builds):
Builds (or logs if builds failed) available at: