ComPPare 1.0.0
Loading...
Searching...
No Matches
comppare::plugin::google_benchmark Namespace Reference

Classes

class  google_benchmark_manager
 Manager class for Google Benchmark integration. More...
 
class  GoogleBenchmarkPlugin
 Google Benchmark plugin for the ComPPare framework. More...
 
class  state
 State class to manage the benchmark state. More...
 

Functions

template<comppare::internal::concepts::FloatingPoint T>
void SetIterationTime (T time)
 Set the iteration time for the current benchmark.
 
template<typename Rep , typename Period >
void SetIterationTime (std::chrono::duration< Rep, Period > time)
 Set the iteration time for the current benchmark.
 

Function Documentation

◆ SetIterationTime() [1/2]

template<typename Rep , typename Period >
void comppare::plugin::google_benchmark::SetIterationTime ( std::chrono::duration< Rep, Period >  time)
inline

Set the iteration time for the current benchmark.

Template Parameters
RepThe representation type of the duration.
PeriodThe period type of the duration.
Parameters
timeThe iteration time as a std::chrono::duration.

This function sets the iteration time for the current benchmark state. It converts the provided std::chrono::duration to seconds and calls SetIterationTime on the benchmark state.

Note
This function is only applicable when using Manual timing mode in Google Benchmark.
This function must be called within the benchmark loop to take effect.

◆ SetIterationTime() [2/2]

void comppare::plugin::google_benchmark::SetIterationTime ( time)
inline

Set the iteration time for the current benchmark.

Template Parameters
TThe type of the time value (must be a floating point type).
Parameters
timeThe iteration time in microseconds.

This function sets the iteration time for the current benchmark state. It converts the provided time from microseconds to seconds and calls SetIterationTime on the benchmark state.

Note
This function is only applicable when using Manual timing mode in Google Benchmark.
This function must be called within the benchmark loop to take effect.