What is the purpose of isTime=true parameter in Trend metric

I didn’t understand isTime=true parameter in Trend metric.

What is the difference beetween isTime=true or false

const trend = new Trend('login_duration, true);

When I set isTime=true ,what exactly happens according to default parameter(isTime=false)?

Hi Yusuf,

this parameter is useful when aggregating the metric samples or displaying the metric results in the end-of-test summary.

For example, with the “Simple example” script on the docs page see how the metric is displayed with isTime=false:

my_trend.............: avg=1.5     min=1       med=1.5     max=2       p(90)=1.9     p(95)=1.95

Changing it to isTime=true, the added values are assumed to be milliseconds and the summary changes to:

my_trend.............: avg=1.5ms min=1ms  med=1.5ms max=2ms  p(90)=1.9ms p(95)=1.95ms

You can see how the summary script changes this here.

This parameter might also be relevant for any outputs that want to aggregate time values differently, or when writing your own handleSummary() function.

Hope this helps,


@imiric thanks for information, I understood very well