How get reporting interval in wql?

95 Views Asked by At

At the picture from Wavefront below I see that at between 11:13 and 11:14 there was one request to my API:

enter image description here

I need to display a requests per second graph. When I use rate() I get:

enter image description here

The request point in the Y axis has value 0.1 but I expect 1 request. And if I change scale, the Y value changes as well. From documentation :

rate() finds the per-second rate of change between pairs of adjacent (successively reported) data values, where the later value is greater than the earlier value. The rate of change between a pair of increasing data values is computed as follows: 1. Subtract the earlier data value from the later value. 2. Divide the difference by the number of seconds in the reporting interval.

How can I get the reporting interval in the query to make it show the request count correctly?

1

There are 1 best solutions below

0
On

It looks like align() + ratediff() do what I want

enter image description here