martymarron / xk6-output-prometheus-pushgateway

This is a k6 extension for publishing test-run metrics to Prometheus via Pushgateway.
Apache License 2.0
10 stars 5 forks source link

Limit to push metrics single point in time per flush #2

Closed martymarron closed 1 year ago

martymarron commented 1 year ago

Description

This PR adds the restriction to push metrics only at the most recent point in a flush period. This aims to improve the performance of pushing by eliminating redundant metrics to be pushed. Besides, this PR conducts some code-clean-ups.

ezh commented 1 year ago

k6 processes its outputs once per second and that is also a default flush period in this extension. The number of k6 builtin metrics is 26 and they are collected at the rate of 50ms. In practice it means that there will be around 1000-1500 samples on average per each flush period in case of raw mapping. If custom metrics are configured, that estimate will have to be adjusted.

https://github.com/my-troubleshooting/sprint-prometheus/tree/main

martymarron commented 1 year ago

k6 processes its outputs once per second and that is also a default flush period in this extension. The number of k6 builtin metrics is 26 and they are collected at the rate of 50ms. In practice it means that there will be around 1000-1500 samples on average per each flush period in case of raw mapping. If custom metrics are configured, that estimate will have to be adjusted.

https://github.com/my-troubleshooting/sprint-prometheus/tree/main

Good to know. Thanks!