Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid QPS function #6

Open
wroblewj0 opened this issue Apr 6, 2023 · 0 comments
Open

Invalid QPS function #6

wroblewj0 opened this issue Apr 6, 2023 · 0 comments

Comments

@wroblewj0
Copy link

Your QPS function does not return a valid statistic because you're attempting to create a data point where one doesn't exist. From https://ns1.com/api?docId=2361

Returns current queries per second (QPS) for the account. Queries per second (QPS) are reported by the NS1 API for Managed DNS networks using the same method for calculating account, zone, and record-level stats: Once per minute on the minute, a new QPS value is calculated using the query count in a two minute period ending five minutes ago. This query count is divided by 120 seconds to return an average QPS for that time period. For example, an API call at 10:07:37 UTC will receive a QPS value using the query count between 10:00:00 and 10:02:00.

So 10:07:37 - 5 = 10:02:37, rounded to 10:02, but the data returned is the average of two minutes, so you've either got to do (probably a lot) more math to reverse engineer the data NS1 actually provides, or accept that they don't provide real-time data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant