Their code base says:
Benchmarks
The benchmarks below are EOS contracts which are set on the
eosmechanics account on Mainnet, CryptoKylin Testnet, and Jungle
Testnet. They are executed during each block producers' schedule, and
the timings recorded on-chain using the standard cpu_usage_us
transaction field. The data is freely available to view and analyze,
and we encourage doing so to help identify issues and improve block
producer performance.
Example tools that utilize this data:
- EOS Block Producer Benchmarks by Aloha
- EOS Block Producer Performance by EOS Titan
CPU Benchmark
This benchmark targets the CPU
by calculating Mersenne prime numbers. Calculating primes is an
industry standard for measuring CPU performance and it uses code
operations that are common in software development.
RAM Benchmark
This benchmark targets EOS RAM by rapidly writing to and reading from a RAM table. Due to inefficiencies within the EOSIO
software this benchmark is currently CPU heavy and thus we consider it
experimental and very similar to the CPU benchmark. As the software
performance is improved we expect the results of this benchmark to
become more meaningful.
So in essence, they run the cpu action, and then they measure the resulting time it takes to execute the code from the statement that comes from cleos
:
cleos push action eosmechanics cpu '[]' -p eosmechanics
executed transaction: 245582ba292b8fe3614e6bf525bbaa957844a7581794dc3e8b8d887a6052271e 128 bytes 2420 us
In my case, it took 2420 microseconds to execute the transaction
cpu
action and getcpu_usage
from the transaction which return. Is it true?