filecoin-project / filecoin-project/retrieval-load-testing
Hit Prometheus URL for CPU & Memory metrics from Boost at end of test
- Dominant language
- JavaScript
- Stars
- 4
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
# What
We need to collect memory and CPU usage from boost at the end of the test. Boost can expose these values via prometheus (when enabled). We'd like to collect these at the end of the test run.
# Suggested implementation
Add new env vars in the .env file:
BOOST_PROMETHEUS_URL
Add a tear down function to the script: https://k6.io/docs/using-k6/test-lifecycle/
If BOOST_PROMETHEUS_URL is present, hit it to collect avg CPU usage and avg Memory usage. (maybe also collect a median + 90%?). You'll need to figure out the right metric names and the right endpoints to hit to properly query. You may need to record the test start time in setup() so it's available in teardown so you'll be able to get the right time range to query.
Once you have the values, recommend saving to a "Metric.Guage" (https://k6.io/docs/javascript-api/k6-metrics/gauge/), which should put it into the summary report under a "last value" (bit of a hack-ish way to save a single value into the summary)
# Acceptance criteria
CPU & Memory usage are include in the JSON output of the CSV summary report.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.