Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qbenchmarktimemeasurers_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
ifndef
QBENCHMARKTIMEMEASURERS_P_H
5
#
define
QBENCHMARKTIMEMEASURERS_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtTest
/
private
/
qbenchmarkmeasurement_p
.
h
>
19
#
include
<
QtCore
/
qelapsedtimer
.
h
>
20
#
include
<
QtTest
/
private
/
cycle_include_p
.
h
>
21
22
QT_BEGIN_NAMESPACE
23
24
class
QBenchmarkTimeMeasurer :
public
QBenchmarkMeasurerBase
25
{
26
public
:
27
void
start() override;
28
void
updateMeasurement() override;
29
QList<Measurement> stop() override;
30
bool
isMeasurementAccepted(Measurement measurement) override;
31
int
adjustIterationCount(
int
sugestion) override;
32
int
adjustMedianCount(
int
suggestion) override;
33
bool
needsWarmupIteration() override;
34
private
:
35
QElapsedTimer time;
36
};
37
38
#
ifdef
HAVE_TICK_COUNTER
// defined in 3rdparty/cycle/cycle_p.h
39
40
class
QBenchmarkTickMeasurer :
public
QBenchmarkMeasurerBase
41
{
42
public
:
43
void
start() override;
44
void
updateMeasurement() override;
45
QList<Measurement> stop() override;
46
bool
isMeasurementAccepted(Measurement measurement) override;
47
int
adjustIterationCount(
int
) override;
48
int
adjustMedianCount(
int
suggestion) override;
49
bool
needsWarmupIteration() override;
50
private
:
51
CycleCounterTicks startTicks;
52
};
53
54
#
endif
// HAVE_TICK_COUNTER
55
56
QT_END_NAMESPACE
57
58
#
endif
// QBENCHMARKTIMEMEASURERS_P_H
qtbase
src
testlib
qbenchmarktimemeasurers_p.h
Generated on
for Qt by
1.18.0