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
11
12
13namespace 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//
24class Q_TESTLIB_EXPORT QBenchmarkIterationController
25{
26public:
29 QBenchmarkIterationController(RunMode runMode);
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
48namespace QTest
49{
50 void Q_TESTLIB_EXPORT setBenchmarkResult(qreal result, QBenchmarkMetric metric);
51}
52
53// --- END public API ---
54
56
57#endif // QBENCHMARK_H
short next
Definition keywords.cpp:445
Combined button and popup list for selecting options.
GLuint64EXT * result
[6]
double qreal
Definition qtypes.h:187