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
qbenchmarkvalgrind_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
QBENCHMARKVALGRIND_P_H
5
#
define
QBENCHMARKVALGRIND_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
<
QtTest
/
private
/
qbenchmarkmetric_p
.
h
>
20
#
include
<
QtCore
/
qmap
.
h
>
21
#
include
<
QtCore
/
qstring
.
h
>
22
23
QT_REQUIRE_CONFIG
(
valgrind
);
24
25
QT_BEGIN_NAMESPACE
26
27
class
QBenchmarkValgrindUtils
28
{
29
public
:
30
static
bool
haveValgrind();
31
static
bool
rerunThroughCallgrind(
const
QStringList &origAppArgs,
int
&exitCode);
32
static
bool
runCallgrindSubProcess(
const
QStringList &origAppArgs,
int
&exitCode);
33
static
qint64 extractResult(
const
QString &fileName);
34
static
QString getNewestFileName();
35
static
qint64 extractLastResult();
36
static
void
cleanup();
37
static
QString outFileBase(qint64 pid = -1);
38
};
39
40
class
QBenchmarkCallgrindMeasurer
:
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
)
override
;
49
bool
needsWarmupIteration
()
override
;
50
};
51
52
QT_END_NAMESPACE
53
54
#
endif
// QBENCHMARKVALGRIND_H
QBenchmarkCallgrindMeasurer
Definition
qbenchmarkvalgrind_p.h:41
QBenchmarkCallgrindMeasurer::needsWarmupIteration
bool needsWarmupIteration() override
Definition
qbenchmarkvalgrind.cpp:207
QBenchmarkCallgrindMeasurer::adjustMedianCount
int adjustMedianCount(int) override
Definition
qbenchmarkvalgrind.cpp:202
QBenchmarkCallgrindMeasurer::adjustIterationCount
int adjustIterationCount(int) override
Definition
qbenchmarkvalgrind.cpp:197
QBenchmarkCallgrindMeasurer::start
void start() override
Definition
qbenchmarkvalgrind.cpp:171
QBenchmarkCallgrindMeasurer::isMeasurementAccepted
bool isMeasurementAccepted(Measurement measurement) override
Definition
qbenchmarkvalgrind.cpp:191
QBenchmarkCallgrindMeasurer::stop
QList< Measurement > stop() override
Definition
qbenchmarkvalgrind.cpp:184
QBenchmarkCallgrindMeasurer::updateMeasurement
void updateMeasurement() override
Definition
qbenchmarkvalgrind.cpp:176
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(valgrind)
qtbase
src
testlib
qbenchmarkvalgrind_p.h
Generated on
for Qt by
1.18.0