Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QTest::QBenchmarkIterationController Class Reference

#include <qbenchmark.h>

+ Collaboration diagram for QTest::QBenchmarkIterationController:

Public Types

enum  RunMode { RepeatUntilValidMeasurement , RunOnce }
 

Public Member Functions

 QBenchmarkIterationController ()
 
 QBenchmarkIterationController (RunMode runMode)
 
 ~QBenchmarkIterationController ()
 
bool isDone () const noexcept
 
void next () noexcept
 

Public Attributes

int i
 

Detailed Description

The QBenchmarkIterationController class is used by the QBENCHMARK macro to drive the benchmarking loop. It is responsible for starting and stopping the timing measurements as well as calling the result reporting functions.

Definition at line 24 of file qbenchmark.h.

Member Enumeration Documentation

◆ RunMode

Enumerator
RepeatUntilValidMeasurement 
RunOnce 

Definition at line 27 of file qbenchmark.h.

Constructor & Destructor Documentation

◆ QBenchmarkIterationController() [1/2]

QTest::QBenchmarkIterationController::QBenchmarkIterationController ( )

Definition at line 155 of file qbenchmark.cpp.

References QTest::beginBenchmarkMeasurement(), and i.

+ Here is the call graph for this function:

◆ QBenchmarkIterationController() [2/2]

QTest::QBenchmarkIterationController::QBenchmarkIterationController ( RunMode runMode)

Definition at line 147 of file qbenchmark.cpp.

References QTest::beginBenchmarkMeasurement(), QBenchmarkTestMethodData::current, i, and RunOnce.

+ Here is the call graph for this function:

◆ ~QBenchmarkIterationController()

QTest::QBenchmarkIterationController::~QBenchmarkIterationController ( )

Definition at line 163 of file qbenchmark.cpp.

References QBenchmarkTestMethodData::current, and QTest::endBenchmarkMeasurement().

+ Here is the call graph for this function:

Member Function Documentation

◆ isDone()

bool QTest::QBenchmarkIterationController::isDone ( ) const
noexcept

Definition at line 170 of file qbenchmark.cpp.

References QBenchmarkTestMethodData::current, i, and QTest::iterationCount().

+ Here is the call graph for this function:

◆ next()

void QTest::QBenchmarkIterationController::next ( )
noexcept

Definition at line 179 of file qbenchmark.cpp.

References i.

Member Data Documentation

◆ i

int QTest::QBenchmarkIterationController::i

Definition at line 33 of file qbenchmark.h.

Referenced by QBenchmarkIterationController().


The documentation for this class was generated from the following files: