How do you decode the output of Perl Benchmark :: timestr?

I use Benchmark , which outputs:

1 wallclock secs ( 0.22 usr + 0.00 sys = 0.22 CPU) @ 4545454.55/s (n=1000000)

can anyone describe in more detail each of the numbers above?

+4
source share
1 answer
  • 1 wallclock secs

It took 1 second of real time to run the test.

  • 0.22 usr

0.22 seconds per CPU in user mode

  • 0.00 sys

0 seconds of processor time consumed by the kernel

  • 0.22 CPU

Total processor time

  • n = 1,000,000

the number of iterations of the test that was run during this time

  • 4545454.55 / s

The total number of iterations that can be started in 1 second of the processor time (these are iterations / processor time)

+7
source

Source: https://habr.com/ru/post/1386649/


All Articles