On Wed, Jan 18, 2017 at 11:17 AM, Chris Mumford <
cmum...@chromium.org> wrote:
> Can UMA log negative samples? From what I can see only
> UMA_HISTOGRAM_SPARSE_SLOWLY can log negative values.
Non-sparse logs to buckets in an array, and the array is pushed up (so
you should only use a dense set of small positive integers). Sparse
logs to a hash, so you can log sparse values, but best to not log
~tons of sparse values.
HistogramBase::Sample is int32_t, SampleMap uses a
std::map<Sample,Count>, so I expect things are probably safe-ish on
the client side. But I'd go looking for examples with negative values
on the UMA server before landing anything, just in case.
-scott