-
What Grafana version and what operating system are you using?
-
grafana/grafana:9.3.2
andinfluxdb:1.8.10
in Docker - Brave 1.47.171 Chromium: 109.0.5414.87 (Official Build) (arm64)
-
-
What are you trying to achieve?
The larger goal: an automated, long-term performance trends monitoring, using k6 and Grafana. (I’m fairly new to this, so alternative suggestions to go about this are welcome.)
The sub-goal: correctly delineate k6’s benchmarkrun
s via Grafana’s annotations. -
How are you trying to achieve it?
- Doing an HTTP
POST
of a start- and end-annotation in k6’ssetup()
andteardown()
functions:
export function setup() { postAnnotation(dashboardUID, panelId, Date.now(), `${sha}: start`) }
- Running a (mock) benchmark:
k6 run --out influxdb=http://localhost:8086/db load.js --vus 10 --duration 10s
- Setting InfluxDB as Grafana’s data-source and visualizing the k6 metrics on the prebuilt dashboard.
- Doing an HTTP
-
What happened?
By querying/api/annotations
, I see that the start-annotation, the left one on the image, has both itstime
andtimeEnd
at 1675533882705, or 18:04:42**.705**, and was, I presume, rounded up and thus graphed at 18:04:43. (Similarly for end-annotation, with 861 milliseconds in itstime
andtimeEnd
.)
On the other hand, the ‘table view’ in Grafana shows the first measurement, stored in InfluxDB, rounded down(?) to 18:04:42.
-
What did you expect to happen?
All k6 benchmark measurements, which should’ve(?) been sent between itssetup()
andteardown()
functions, should be graphed between the 2 annotations.