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
qqmljscompilerstatsreporter_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef QQMLJSCOMPILERSTATSREPORTER_P_H
5#define QQMLJSCOMPILERSTATSREPORTER_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#include <QTextStream>
18
19#include <qtqmlcompilerexports.h>
20
21#include <private/qqmljscompilerstats_p.h>
22
24
25namespace QQmlJS {
26
27class Q_QMLCOMPILER_EXPORT AotStatsReporter
28{
29public:
31
32 QString format() const;
33
34private:
35 void formatDetailedStats(QTextStream &) const;
36 void formatSummary(QTextStream &) const;
37 QString formatSuccessRate(int codegens, int successes) const;
38
39 const AotStats &m_aotstats;
40
41 struct Counters
42 {
43 int successes = 0;
44 int codegens = 0;
45 };
46
47 Counters m_totalCounters;
48 QHash<QString, Counters> m_moduleCounters;
49 QHash<QString, QHash<QString, Counters>> m_fileCounters;
50 QList<std::chrono::microseconds> m_successDurations;
51};
52
53} // namespace QQmlJS
54
56
57#endif // QQMLJSCOMPILERSTATSREPORTER_P_H
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum format