Bogdan
April 2, 2021, 1:36pm
1
Hi,
I’m having an issue with New Trend in that its not displaying the unit time in the console output.
This is how am I setting it. Not sure what I’m doing wrong.
const myTrend = new Trend('http_req_duration_create_booking');
myTrend.add(resCreateBookings.timings.duration, {
bookingTag: 'create booking',
});
the Trend
constructor has an optional second argument that tells k6 it’s dealing with time, see the docs: Trend
So, in your case, you have to do this:
const myTrend = new Trend('http_req_duration_create_booking', true);
2 Likes
Bogdan
April 2, 2021, 2:09pm
3
Thanks @ned for the fast reply…I’m not sure how I missed that in the documentation. Unit time is displayed if I add true. Thanks again and sorry for not properly reading the documentation.