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

Fix nan crud.stats latency #288

Merged
merged 3 commits into from
May 20, 2022
Merged

Conversation

DifferentialOrange
Copy link
Member

@DifferentialOrange DifferentialOrange commented May 17, 2022

doc: fix quantile tolerated error description

stats: make quantile age params configurable

The main motivation of making these parameters configurable is to be
able to write time-adequate test cases for #286 issue, but they may be
useful in getting rid of #286 effect at all or in quantile time window
calibration.

After this patch, statistics summary quantile aging params
age_bucket_count and max_age_time [1] could be configured:

crud.cfg{
    stats_quantile_age_bucket_count = 3,
    stats_quantile_max_age_time = 30,
}

Only type validation is conducted in crud.cfg, every other validation is
performed by metrics itself.

  1. https://www.tarantool.io/ru/doc/latest/book/monitoring/api_reference/#summary

stats: separate quantile and average fields

Add separate quantile (latency_quantile_recent) and average (
latency_average) fields to crud.stats() output. latency field and
tarantool/metrics output remains unchanged.

Before this patch, latency displayed latency_quantile_recent or
latency_average and there wasn't any was to see pre-computed average
if quantiles are enabled. But it may be useful if quantile is nan.

Quantiles may display -nan if there were no observations for a several
ages. Such behavior is expected [1] and valid: for example, Grafana
should ignore such values and they will be displayed as No data for
a window when there wasn't any requests.

  1. Summary quantiles respond +Inf if rps decreases to zero metrics#303

I didn't forget about

  • Tests
  • Changelog
  • Documentation

Closes #286

@DifferentialOrange DifferentialOrange changed the base branch from master to DifferentialOrange/gh-284-tolerated-error-lost May 17, 2022 14:37
CHANGELOG.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
Base automatically changed from DifferentialOrange/gh-284-tolerated-error-lost to master May 18, 2022 08:27
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-286-age-nan branch 3 times, most recently from 8fe6dbb to 4429a00 Compare May 18, 2022 15:50
The main motivation of making these parameters configurable is to be
able to write time-adequate test cases for #286 issue, but they may be
useful in getting rid of #286 effect at all or in quantile time window
calibration.

After this patch, statistics summary quantile aging params
`age_bucket_count` and `max_age_time` [1] could be configured:

  crud.cfg{
      stats_quantile_age_bucket_count = 3,
      stats_quantile_max_age_time = 30,
  }

Only type validation is conducted in crud.cfg, every other validation is
performed by metrics itself.

1. https://www.tarantool.io/ru/doc/latest/book/monitoring/api_reference/#summary

Part of #286
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-286-age-nan branch 2 times, most recently from 2e5113d to 85e6ac8 Compare May 18, 2022 16:14
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-286-age-nan branch 3 times, most recently from 35ac849 to 4a76d92 Compare May 20, 2022 08:14
Add separate quantile (`latency_quantile_recent`) and average (
`latency_average`) fields to `crud.stats()` output. `latency` field and
tarantool/metrics output remains unchanged.

Before this patch, `latency` displayed `latency_quantile_recent` or
`latency_average` and there wasn't any was to see pre-computed average
if quantiles are enabled. But it may be useful if quantile is `nan`.

Quantiles may display `-nan` if there were no observations for a several
ages. Such behavior is expected [1] and valid: for example, Grafana
should ignore such values and they will be displayed as `No data` for
a window when there wasn't any requests.

1. tarantool/metrics#303

Closes #286
@DifferentialOrange DifferentialOrange force-pushed the DifferentialOrange/gh-286-age-nan branch from 4a76d92 to c66d330 Compare May 20, 2022 10:50
@Totktonada Totktonada merged commit e709a87 into master May 20, 2022
@Totktonada Totktonada deleted the DifferentialOrange/gh-286-age-nan branch May 20, 2022 11:32
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

Successfully merging this pull request may close these issues.

stats: select ok latency becomes -nan after 30 seconds
3 participants