LeviLamina
Loading...
Searching...
No Matches
PerfContextTracker.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/platform/brstd/function_ref.h"
7#include "mc/util/PerfContextEvent.h"
8
9// auto generated forward declare list
10// clang-format off
12// clang-format on
13
14class PerfContextTracker {
15public:
16 // PerfContextTracker inner types declare
17 // clang-format off
18 class Duration;
19 class EventScope;
20 class Timer;
21 // clang-format on
22
23 // PerfContextTracker inner types define
24 class Duration {
25 public:
26 // member variables
27 // NOLINTBEGIN
30 // NOLINTEND
31
32 public:
33 // prevent constructor by default
34 Duration& operator=(Duration const&);
35 Duration(Duration const&);
36
37 public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual ~Duration();
41
42 virtual void reset();
43 // NOLINTEND
44
45 public:
46 // member functions
47 // NOLINTBEGIN
48 MCNAPI Duration();
49 // NOLINTEND
50
51 public:
52 // constructor thunks
53 // NOLINTBEGIN
54 MCNAPI void* $ctor();
55 // NOLINTEND
56
57 public:
58 // destructor thunk
59 // NOLINTBEGIN
60 MCNAPI void $dtor();
61 // NOLINTEND
62
63 public:
64 // virtual function thunks
65 // NOLINTBEGIN
66 MCNAPI void $reset();
67
68
69 // NOLINTEND
70
71 public:
72 // vftables
73 // NOLINTBEGIN
74 MCNAPI static void** $vftable();
75 // NOLINTEND
76 };
77
78 class EventScope {
79 public:
80 // member variables
81 // NOLINTBEGIN
84 // NOLINTEND
85
86 public:
87 // prevent constructor by default
88 EventScope& operator=(EventScope const&);
89 EventScope(EventScope const&);
90 EventScope();
91
92 public:
93 // member functions
94 // NOLINTBEGIN
95 MCNAPI explicit EventScope(::PerfContextEvent eventType);
96
97 MCNAPI ~EventScope();
98 // NOLINTEND
99
100 public:
101 // constructor thunks
102 // NOLINTBEGIN
103 MCNAPI void* $ctor(::PerfContextEvent eventType);
104 // NOLINTEND
105
106 public:
107 // destructor thunk
108 // NOLINTBEGIN
109 MCNAPI void $dtor();
110 // NOLINTEND
111 };
112
113 class Timer : public ::PerfContextTracker::Duration {
114 public:
115 // member variables
116 // NOLINTBEGIN
119 // NOLINTEND
120
121 public:
122 // prevent constructor by default
123 Timer& operator=(Timer const&);
124 Timer(Timer const&);
125 Timer();
126
127 public:
128 // virtual functions
129 // NOLINTBEGIN
130 virtual void reset() /*override*/;
131
132 virtual ~Timer() /*override*/ = default;
133 // NOLINTEND
134
135 public:
136 // virtual function thunks
137 // NOLINTBEGIN
138 MCNAPI void $reset();
139
140
141 // NOLINTEND
142
143 public:
144 // vftables
145 // NOLINTBEGIN
146 MCNAPI static void** $vftable();
147 // NOLINTEND
148 };
149
150public:
151 // member variables
152 // NOLINTBEGIN
166 // NOLINTEND
167
168public:
169 // prevent constructor by default
170 PerfContextTracker& operator=(PerfContextTracker const&);
171 PerfContextTracker(PerfContextTracker const&);
172 PerfContextTracker();
173
174public:
175 // member functions
176 // NOLINTBEGIN
177 MCNAPI void _reset();
178
179#ifdef LL_PLAT_C
180 MCNAPI void _resetStats();
181
182 MCNAPI bool _tryBeginContext(::std::string const& contextName, ::std::chrono::steady_clock::time_point const& now);
183
184 MCNAPI void _tryEndContext(::std::chrono::steady_clock::time_point const& now);
185
186 MCNAPI bool _tryRestartContext(::std::chrono::steady_clock::time_point const& now);
187
188 MCNAPI void tick(
189 ::std::string const& currentContext,
190 uint clientCount,
191 uint renderDistance,
192 uint simDistance,
194 reporter
195 );
196#endif
197 // NOLINTEND
198
199public:
200 // static functions
201 // NOLINTBEGIN
202 MCNAPI static ::PerfContextTracker& getInstance();
203 // NOLINTEND
204};
Definition PerfContextTrackerReport.h:5
Definition PerfContextTracker.h:24
static MCAPI void ** $vftable()
Definition PerfContextTracker.h:78
MCAPI void * $ctor(::PerfContextEvent eventType)
MCAPI EventScope(::PerfContextEvent eventType)
Definition PerfContextTracker.h:113
static MCAPI void ** $vftable()
MCAPI void _reset()
static MCAPI ::PerfContextTracker & getInstance()
Definition function_ref.h:60
Definition Alias.h:14