Qt 4.8
Public Functions | Static Public Functions | Static Public Variables | List of all members
QBenchmarkEvent Class Reference

#include <qbenchmarkevent_p.h>

Inheritance diagram for QBenchmarkEvent:
QBenchmarkMeasurerBase

Public Functions

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

Static Public Functions

static bool eventCountingMechanism (void *message)
 

Static Public Variables

static qint64 eventCounter = 0
 

Detailed Description

Definition at line 62 of file qbenchmarkevent_p.h.

Constructors and Destructors

◆ ~QBenchmarkEvent()

QBenchmarkEvent::~QBenchmarkEvent ( )

Definition at line 52 of file qbenchmarkevent.cpp.

53 {
54 }

Functions

◆ adjustIterationCount()

int QBenchmarkEvent::adjustIterationCount ( int  suggestion)
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 84 of file qbenchmarkevent.cpp.

85 {
86  return suggestion;
87 }

◆ adjustMedianCount()

int QBenchmarkEvent::adjustMedianCount ( int  suggestion)
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 89 of file qbenchmarkevent.cpp.

90 {
91  Q_UNUSED(suggestion);
92  return 1;
93 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ checkpoint()

qint64 QBenchmarkEvent::checkpoint ( )
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 63 of file qbenchmarkevent.cpp.

64 {
66 }
static qint64 eventCounter

◆ eventCountingMechanism()

bool QBenchmarkEvent::eventCountingMechanism ( void *  message)
static

Definition at line 101 of file qbenchmarkevent.cpp.

Referenced by repeatCount(), and start().

102 {
103  Q_UNUSED(message);
105  return false;
106 }
static qint64 eventCounter
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ isMeasurementAccepted()

bool QBenchmarkEvent::isMeasurementAccepted ( qint64  measurement)
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 78 of file qbenchmarkevent.cpp.

79 {
80  Q_UNUSED(measurement);
81  return true;
82 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ metricType()

QTest::QBenchmarkMetric QBenchmarkEvent::metricType ( )
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 95 of file qbenchmarkevent.cpp.

Referenced by repeatCount().

96 {
97  return QTest::Events;
98 }

◆ repeatCount()

bool QBenchmarkEvent::repeatCount ( )
inlinevirtual

Reimplemented from QBenchmarkMeasurerBase.

Definition at line 72 of file qbenchmarkevent_p.h.

72 { return 1; }

◆ start()

void QBenchmarkEvent::start ( )
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 56 of file qbenchmarkevent.cpp.

57 {
61 }
QAbstractEventDispatcher::EventFilter oldEventFilter
static QAbstractEventDispatcher * instance(QThread *thread=0)
Returns a pointer to the event dispatcher object for the specified thread.
static qint64 eventCounter
EventFilter setEventFilter(EventFilter filter)
Replaces the event filter function for this QAbstractEventDispatcher with filter and returns the repl...
static bool eventCountingMechanism(void *message)
The QAbstractEventDispatcher class provides an interface to manage Qt&#39;s event queue.

◆ stop()

qint64 QBenchmarkEvent::stop ( )
virtual

Implements QBenchmarkMeasurerBase.

Definition at line 68 of file qbenchmarkevent.cpp.

69 {
73 }
QAbstractEventDispatcher::EventFilter oldEventFilter
static QAbstractEventDispatcher * instance(QThread *thread=0)
Returns a pointer to the event dispatcher object for the specified thread.
static qint64 eventCounter
EventFilter setEventFilter(EventFilter filter)
Replaces the event filter function for this QAbstractEventDispatcher with filter and returns the repl...
The QAbstractEventDispatcher class provides an interface to manage Qt&#39;s event queue.

Properties

◆ eventCounter

qint64 QBenchmarkEvent::eventCounter = 0
static

Definition at line 75 of file qbenchmarkevent_p.h.

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


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