OpenTSDB/opentsdb — pull request #310 by mjibson (2014-04-09 22:46:17+00:00)
Title: Return 0 on negative diff on counters if reset < 0

When we are dealing with a counter, we know it always increases. Thus,
a negative diff means either a rollover or a reset. We can detect
rollovers quite well, and the default is reasonable. However, for
resets to be useful, we must specify a reset value. This can be tedious
to determine for all queries. Instead, support a resetValue of -1,
which zeros any data with a negative rate in a counter.