fcf::NTest::Duration class
Package: fcfTest
File: test.hpp
Available from version: 1.0.1
A high-resolution timer utility for benchmarking code execution. It supports both manual timing control and automated execution of functors over a specified number of iterations.
Detailed description
The
Example: Automated Benchmarking
The most concise way to measure a lambda or function by passing it directly to the object.
Methods
- Executes a callable object multiple times and measures the total execution time
- Returns the number of iterations configured for the current benchmarking session
- Records the current timestamp using a high-resolution clock to mark the start of a timing interval
- Records the current timestamp using a high-resolution clock to mark the end of a timing interval.
- Returns the total elapsed time of all benchmark iterations in nanoseconds
- Returns the average duration of a single iteration in nanoseconds
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.