Qt 4.8
Public Functions | Properties | List of all members
QBenchmarkTimeMeasurer Class Reference

#include <qbenchmarkmeasurement_p.h>

Inheritance diagram for QBenchmarkTimeMeasurer:
QBenchmarkMeasurerBase

Public Functions

int adjustIterationCount (int sugestion)
 
int adjustMedianCount (int suggestion)
 
qint64 checkpoint ()
 
bool isMeasurementAccepted (qint64 measurement)
 
QTest::QBenchmarkMetric metricType ()
 
bool needsWarmupIteration ()
 
void start ()
 
qint64 stop ()
 
- Public Functions inherited from QBenchmarkMeasurerBase
virtual void init ()
 
virtual bool repeatCount ()
 
virtual ~QBenchmarkMeasurerBase ()
 

Properties

QElapsedTimer time
 

Detailed Description

Definition at line 78 of file qbenchmarkmeasurement_p.h.

Functions

◆ adjustIterationCount()

int QBenchmarkTimeMeasurer::adjustIterationCount ( int  sugestion)
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 72 of file qbenchmarkmeasurement.cpp.

73 {
74  return suggestion;
75 }

◆ adjustMedianCount()

int QBenchmarkTimeMeasurer::adjustMedianCount ( int  suggestion)
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 82 of file qbenchmarkmeasurement.cpp.

83 {
84  return 1;
85 }

◆ checkpoint()

qint64 QBenchmarkTimeMeasurer::checkpoint ( )
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 57 of file qbenchmarkmeasurement.cpp.

58 {
59  return time.elapsed();
60 }
qint64 elapsed() const
Returns the number of milliseconds since this QElapsedTimer was last started.

◆ isMeasurementAccepted()

bool QBenchmarkTimeMeasurer::isMeasurementAccepted ( qint64  measurement)
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 67 of file qbenchmarkmeasurement.cpp.

68 {
69  return (measurement > 50);
70 }

◆ metricType()

QTest::QBenchmarkMetric QBenchmarkTimeMeasurer::metricType ( )
virtual

◆ needsWarmupIteration()

bool QBenchmarkTimeMeasurer::needsWarmupIteration ( )
virtual

Reimplemented from QBenchmarkMeasurerBase.

Definition at line 77 of file qbenchmarkmeasurement.cpp.

78 {
79  return true;
80 }

◆ start()

void QBenchmarkTimeMeasurer::start ( )
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 52 of file qbenchmarkmeasurement.cpp.

53 {
54  time.start();
55 }
void start()
Starts this timer.

◆ stop()

qint64 QBenchmarkTimeMeasurer::stop ( )
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 62 of file qbenchmarkmeasurement.cpp.

63 {
64  return time.elapsed();
65 }
qint64 elapsed() const
Returns the number of milliseconds since this QElapsedTimer was last started.

Properties

◆ time

QElapsedTimer QBenchmarkTimeMeasurer::time
private

Definition at line 90 of file qbenchmarkmeasurement_p.h.

Referenced by checkpoint(), start(), and stop().


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