observe method
Observe a new value v
and store it in the corresponding buckets of a
histogram with labels.
Implementation
void observe(double v) {
for (var i = 0; i < buckets.length; ++i) {
if (v <= buckets[i]) {
_bucketValues[i]++;
}
}
_sum += v;
}