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
qohosjscallbatchtrace.h
Go to the documentation of this file.
1
// Copyright (C) 2026 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
QOHOSJSCALLBATCHTRACE_H
5
#
define
QOHOSJSCALLBATCHTRACE_H
6
7
#
include
<
QtCore
/
qglobal
.
h
>
8
#
include
<
cstddef
>
9
#
include
<
optional
>
10
#
include
<
string
>
11
#
include
<
vector
>
12
13
QT_BEGIN_NAMESPACE
14
15
namespace
QtOhos
{
16
17
// logs what QtOhos::JsCallBatch batches in the qt.ohos.jscallbatch category, used on the Qt thread only
18
class
JsCallBatchTrace
19
{
20
public
:
21
void
recordBatchStart
(
const
char
*batchContextName);
22
void
recordBatchEnd
(
const
char
*batchContextName,
std
::size_t queuedCallCount);
23
void
recordQueuedCall
(
const
std
::string &callerContextName);
24
void
recordBlockingCall
(
std
::size_t queuedCallCount,
const
std
::string &callerContextName);
25
void
recordRunForcedBy
(
std
::size_t queuedCallCount,
const
std
::string &runCause);
26
27
private
:
28
struct
TracedBatch
29
{
30
const
char
*contextName;
31
int
callCount = 0;
32
int
firstQueuedCall = 1;
33
int
roundTripCount = 0;
34
std
::optional<
std
::string> optPendingSplitCause;
35
std::vector<std::string> splitCauses;
36
};
37
38
void
recordRunAtEnd(
std
::size_t queuedCallCount);
39
void
logSummary()
const
;
40
std
::string describeQueuedCalls(
std
::size_t queuedCallCount)
const
;
41
static
std
::string describeCount(
int
count,
const
char
*noun);
42
43
int
m_liveBatchCount = 0;
44
std
::optional<TracedBatch> m_optTracedBatch;
45
};
46
47
}
48
49
QT_END_NAMESPACE
50
51
#
endif
QtOhos::JsCallBatchTrace
Definition
qohosjscallbatchtrace.h:19
QtOhos::JsCallBatchTrace::recordRunForcedBy
void recordRunForcedBy(std::size_t queuedCallCount, const std::string &runCause)
Definition
qohosjscallbatchtrace.cpp:75
QtOhos::JsCallBatchTrace::recordBatchStart
void recordBatchStart(const char *batchContextName)
Definition
qohosjscallbatchtrace.cpp:14
QtOhos::JsCallBatchTrace::recordBatchEnd
void recordBatchEnd(const char *batchContextName, std::size_t queuedCallCount)
Definition
qohosjscallbatchtrace.cpp:24
QtOhos::JsCallBatchTrace::recordQueuedCall
void recordQueuedCall(const std::string &callerContextName)
Definition
qohosjscallbatchtrace.cpp:38
QtOhos::JsCallBatchTrace::recordBlockingCall
void recordBlockingCall(std::size_t queuedCallCount, const std::string &callerContextName)
Definition
qohosjscallbatchtrace.cpp:53
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtOhos
Definition
qcore_ohos.cpp:59
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qtbase
src
plugins
platforms
ohos
qohosjscallbatchtrace.h
Generated on
for Qt by
1.18.0