Hi @codebien
Here is the clear output of CLI
xxi@ip-192-xx-x-xxx Documents % echo $K6_PROMETHEUS_RW_TREND_STATS
p(80),p(90),p(95),avg,sum,min,max,med,count
xxi@ip-192-xx-x-xxx Documents % unset K6_PROMETHEUS_RW_TREND_STATS
xxi@ip-192-xx-x-xxx Documents % echo $K6_PROMETHEUS_RW_TREND_STATS
xxi@ip-192-xx-x-xxx Documents % clear
xxi@ip-192-xx-x-xxx Documents % export K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM=true
xxi@ip-192-xx-x-xxx Documents % echo $K6_PROMETHEUS_RW_TREND_STATS
xxi@ip-192-xx-x-xxx Documents % echo $K6_PROMETHEUS_RW_TREND_AS_NATIVE_HISTOGRAM
true
xxi@ip-192-xx-x-xxx Documents % clear
xxi@ip-192-xx-x-xxx Documents % K6_PROMETHEUS_RW_SERVER_URL=http://localhost:9090/api/v1/write k6 run -o experimental-prometheus-rw onboardingServiceLoadTest.js
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
execution: local
script: onboardingServiceLoadTest.js
output: Prometheus remote write (http://localhost:9090/api/v1/write)
scenarios: (100.00%) 1 scenario, 5 max VUs, 5m30s max duration (incl. graceful stop):
* default: Up to 5 looping VUs for 5m0s over 3 stages (gracefulRampDown: 30s, gracefulStop: 30s)
INFO[0001] Request succeeded! source=console
INFO[0001] 200 source=console
✓ is status 201
█ setup
checks.........................: 100.00% ✓ 859 ✗ 0
data_received..................: 525 kB 1.7 kB/s
data_sent......................: 186 kB 614 B/s
http_req_blocked...............: avg=1.03ms min=0s med=1µs max=471.35ms p(90)=1µs p(95)=2µs
http_req_connecting............: avg=151.72µs min=0s med=0s max=44.41ms p(90)=0s p(95)=0s
http_req_duration..............: avg=1.43s min=363.17ms med=1.5s max=2.82s p(90)=2.05s p(95)=2.24s
{ expected_response:true }...: avg=1.43s min=363.17ms med=1.5s max=2.82s p(90)=2.05s p(95)=2.24s
http_req_failed................: 0.00% ✓ 0 ✗ 860
http_req_receiving.............: avg=160.51µs min=36µs med=99µs max=20.13ms p(90)=199.1µs p(95)=303.04µs
http_req_sending...............: avg=165.64µs min=37µs med=114µs max=7.42ms p(90)=232.2µs p(95)=320.19µs
http_req_tls_handshaking.......: avg=785.65µs min=0s med=0s max=429.68ms p(90)=0s p(95)=0s
http_req_waiting...............: avg=1.43s min=362.89ms med=1.5s max=2.82s p(90)=2.05s p(95)=2.24s
http_reqs......................: 860 2.845267/s
iteration_duration.............: avg=1.43s min=363.42ms med=1.5s max=2.82s p(90)=2.05s p(95)=2.24s
iterations.....................: 859 2.841958/s
vus............................: 1 min=0 max=5
vus_max........................: 5 min=5 max=5
running (5m02.3s), 0/5 VUs, 859 complete and 0 interrupted iterations
default ✓ [======================================] 0/5 VUs 5m0s
xxi@ip-192-xx-x-xxx Documents %
Also we have tags given inside the test script like below
export const options = {
stages: [
{ duration: rampUpDuration, target: maxVirtualUsers },
{ duration: durationHold, target: maxVirtualUsers },
{ duration: rampDownDuration, target: 0 },
],
tags: {
testid: 'xxx-service',
scenario: 'load-tests - ' + scenario + '_' + stringDate + '_' + time,
},
}
we see testId and scenario both are coming fine including other metrics like rps, but RT is missing.
our prometheus deployment through docker compose and here is the docker file used for it which pulls the latest prometheus image.
FROM prom/prometheus
ADD prometheus.yml /etc/prometheus/
ENTRYPOINT [ "/bin/prometheus" ]
CMD [ "--web.listen-address=0.0.0.0:9090", \
"--config.file=/etc/prometheus/prometheus.yml", \
"--storage.tsdb.path=/prometheus", \
"--web.console.libraries=/usr/share/prometheus/console_libraries", \
"--web.console.templates=/usr/share/prometheus/consoles", \
"--web.enable-admin-api", \
"--web.enable-remote-write-receiver", \
"--enable-feature=native-histograms,remote-write-receiver" ]
here is the result from dashboard