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
qbenchmark.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 QBENCHMARK_H
5
#define QBENCHMARK_H
6
7
#include <QtTest/qttestglobal.h>
8
#include <QtTest/qbenchmarkmetric.h>
9
10
QT_BEGIN_NAMESPACE
11
12
13
namespace
QTest
14
{
15
16
//
17
// W A R N I N G
18
// -------------
19
//
20
// The QBenchmarkIterationController class is not a part of the
21
// Qt Test API. It exists purely as an implementation detail.
22
//
23
//
24
class
Q_TESTLIB_EXPORT
QBenchmarkIterationController
25
{
26
public
:
27
enum
RunMode
{
RepeatUntilValidMeasurement
, RunOnce };
28
QBenchmarkIterationController
();
29
QBenchmarkIterationController
(RunMode runMode);
30
~QBenchmarkIterationController
();
31
bool
isDone() const noexcept;
32
void
next
() noexcept;
33
int
i
;
34
};
35
36
}
37
38
// --- BEGIN public API ---
39
40
#define QBENCHMARK \
41
for (QTest::QBenchmarkIterationController _q_iteration_controller; \
42
_q_iteration_controller.isDone() == false; _q_iteration_controller.next())
43
44
#define QBENCHMARK_ONCE \
45
for (QTest::QBenchmarkIterationController _q_iteration_controller(QTest::QBenchmarkIterationController::RunOnce); \
46
_q_iteration_controller.isDone() == false; _q_iteration_controller.next())
47
48
namespace
QTest
49
{
50
void
Q_TESTLIB_EXPORT setBenchmarkResult(
qreal
result
, QBenchmarkMetric metric);
51
}
52
53
// --- END public API ---
54
55
QT_END_NAMESPACE
56
57
#endif
// QBENCHMARK_H
QTest::QBenchmarkIterationController
Definition
qbenchmark.h:25
QTest::QBenchmarkIterationController::RunMode
RunMode
Definition
qbenchmark.h:27
QTest::QBenchmarkIterationController::RepeatUntilValidMeasurement
@ RepeatUntilValidMeasurement
Definition
qbenchmark.h:27
i
i
[1]
Definition
doc_src_containers.cpp:169
next
short next
Definition
keywords.cpp:445
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
QTest
[15]
Definition
qtestsupport_core.h:14
result
GLuint64EXT * result
[6]
Definition
qopenglext.h:10932
qreal
double qreal
Definition
qtypes.h:187
qtbase
src
testlib
qbenchmark.h
Generated by
1.10.0