Skip to content

Implement queries-per-second (pps) #6

@smutt

Description

@smutt

It's somewhat standard to count queries on a per-second basis and it would be good to implement this in our charts for comparison's sake. This requires changing the API because for performance sake we do not want the browser performing massive amounts of floating point division for every draw.

Here is the proposal:

Create a parameter called "averaging" which defaults to "day" but can also accept "second". Instead of summing values it will divide values by either 1 or 86400. It will be ignored for instances-detail, load-time, zone-size, and unique-sources. "sum" and "averaging" will be orthogonal, so you can request per-second queries for a set of RSIs and receive them summed together.

This will allow me in the JS to implement per-second charts for packets, RCODEs, and queries. Both for by-week and by-day. I'll implement it first in the PHP and then incrementally in the JS for each chart where it makes sense. Having all the math happen in PHP means loading can stay snappy. If it still drags we can perform the division at cron-time instead of at GET-time.

It will require a new toggle for each chart called "averaging" where the options are "per-day" and "per-second". So the user can create a chart where its by-week and average per-second.

In the future if someone wants per-minute or per-hour it's already mostly implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions