Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QBenchmarkTestMethodData Class Reference

#include <qbenchmark_p.h>

Collaboration diagram for QBenchmarkTestMethodData:

Public Member Functions

 QBenchmarkTestMethodData ()
 ~QBenchmarkTestMethodData ()
void beginDataRun ()
void endDataRun ()
bool isBenchmark () const
bool resultsAccepted () const
int adjustIterationCount (int suggestion)
void setResults (const QList< QBenchmarkMeasurerBase::Measurement > &m, bool setByMacro=true)
void setResult (QBenchmarkMeasurerBase::Measurement m, bool setByMacro=true)
void setBlockSize (int split=32)

Public Attributes

QList< QBenchmarkResultresults
bool valid = false
bool resultAccepted = false
bool runOnce = false
int iterationCount = -1
int measurementBlockSize = 1

Static Public Attributes

static QBenchmarkTestMethodDatacurrent

Detailed Description

Definition at line 123 of file qbenchmark_p.h.

Constructor & Destructor Documentation

◆ QBenchmarkTestMethodData()

QBenchmarkTestMethodData::QBenchmarkTestMethodData ( )
default

◆ ~QBenchmarkTestMethodData()

QBenchmarkTestMethodData::~QBenchmarkTestMethodData ( )

Definition at line 72 of file qbenchmark.cpp.

Member Function Documentation

◆ adjustIterationCount()

int QBenchmarkTestMethodData::adjustIterationCount ( int suggestion)

Definition at line 86 of file qbenchmark.cpp.

◆ beginDataRun()

void QBenchmarkTestMethodData::beginDataRun ( )

Definition at line 77 of file qbenchmark.cpp.

◆ endDataRun()

void QBenchmarkTestMethodData::endDataRun ( )

Definition at line 82 of file qbenchmark.cpp.

◆ isBenchmark()

bool QBenchmarkTestMethodData::isBenchmark ( ) const
inline

Definition at line 135 of file qbenchmark_p.h.

◆ resultsAccepted()

bool QBenchmarkTestMethodData::resultsAccepted ( ) const
inline

Definition at line 136 of file qbenchmark_p.h.

◆ setBlockSize()

void QBenchmarkTestMethodData::setBlockSize ( int split = 32)

Split up iterations into a statistically useful number of blocks.

Record data in blocks. split is the desired number of blocks which is a power of 2 like iterationcount. As long as split is below 32 we treat each iteration as a block. When split is greater than 32 split becomes a divisor for iterationcount. The goal is to reduce overhead from measurements while calculating variance. The default split 32 should be sufficient to get stable block-variance, from which the per-iteration variance (estimator) can be computed by dividing by the block size.

Definition at line 175 of file qbenchmark.cpp.

◆ setResult()

void QBenchmarkTestMethodData::setResult ( QBenchmarkMeasurerBase::Measurement m,
bool setByMacro = true )
inline

Definition at line 139 of file qbenchmark_p.h.

◆ setResults()

void QBenchmarkTestMethodData::setResults ( const QList< QBenchmarkMeasurerBase::Measurement > & m,
bool setByMacro = true )

Definition at line 98 of file qbenchmark.cpp.

Member Data Documentation

◆ current

QBenchmarkTestMethodData * QBenchmarkTestMethodData::current
static

Definition at line 126 of file qbenchmark_p.h.

◆ iterationCount

int QBenchmarkTestMethodData::iterationCount = -1

Definition at line 147 of file qbenchmark_p.h.

◆ measurementBlockSize

int QBenchmarkTestMethodData::measurementBlockSize = 1

Definition at line 148 of file qbenchmark_p.h.

◆ resultAccepted

bool QBenchmarkTestMethodData::resultAccepted = false

Definition at line 145 of file qbenchmark_p.h.

◆ results

QList<QBenchmarkResult> QBenchmarkTestMethodData::results

Definition at line 143 of file qbenchmark_p.h.

◆ runOnce

bool QBenchmarkTestMethodData::runOnce = false

Definition at line 146 of file qbenchmark_p.h.

◆ valid

bool QBenchmarkTestMethodData::valid = false

Definition at line 144 of file qbenchmark_p.h.


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