The first script of this page Metrics

has an output in which the ‘iterations’ metric’s value is 1 and 0.266167/s.

iterations…: 1 0.266167/s

0.266167/s is iterations per second. How is it calculated?

The first script of this page Metrics

has an output in which the ‘iterations’ metric’s value is 1 and 0.266167/s.

iterations…: 1 0.266167/s

0.266167/s is iterations per second. How is it calculated?

Hi @bhavesh

Welcome to the community forums

The build-in metrics iterations is the aggregate number of times the VUs executed the JS script (the default function).

The iteration rate of `0.266167/s`

on the Metrics page can be calculated by dividing the total number of iterations performed by the time it took to perform them. The formula for calculating iteration rate is:

```
Iteration (rate) = Total iterations / Test duration
```

We have in the output:

```
iteration_duration.............: avg=3.75s min=3.75s med=3.75s max=3.75s p(90)=3.75s p(95)=3.75s
iterations.....................: 1 0.266167/s
```

In this case, the script performed only 1 iteration and it probably took a total of 3.753 seconds to complete (3.75 in the output summary). Dividing 1 by 3.753 gives us the iteration rate of 0.266167/s.

I’m not sure if this is what caused the doubt, that you were not seeing the number not exactly adding up in the summary. We would need to see the concrete metric points, for which we need to output or stream the metrics.

Cheers!

1 Like