LeviLamina
Loading...
Searching...
No Matches
CodeBuilderPerformance.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
8// clang-format on
9
11public:
12 // CodeBuilderPerformance inner types define
13 enum class Flags : int {
14 AwaitingFirstCommandSent = 0,
15 AwaitingFirstCommandReceived = 1,
16 AwaitingFirstCommandRun = 2,
17 CodeScreenCached = 3,
18 CodeRunStarted = 4,
19 FirstWorldLaunch = 5,
20 FirstSessionLaunch = 6,
21 TutorialCached = 7,
22 Count = 8,
23 };
24
25 enum class Stage : int {
26 CacheCodescreenStart = 0,
27 CacheCodescreenFinish = 1,
28 WebviewLoadStart = 2,
29 WebviewLoadFinish = 3,
30 CreateNewProject = 4,
31 ProjectLoadStart = 5,
32 ProjectLoadFinish = 6,
33 TutorialLoadStart = 7,
34 TutorialLoadFinish = 8,
35 EditorContentLoaded = 9,
36 LoadBlockly = 10,
37 BlocksContentLoaded = 11,
38 NetworkRequest = 12,
39 DomLoaded = 13,
40 CodeRunStart = 14,
41 CodeRunComplete = 15,
42 FirstCommandSent = 16,
43 FirstCommandReceived = 17,
44 FirstCommandRun = 18,
45 };
46
47public:
48 // static functions
49 // NOLINTBEGIN
51 ::IMinecraftEventing const* eventing,
52 ::CodeBuilderPerformance::Stage stage,
53 ::std::string_view codeProjectId,
54 uint64 tutorialSize,
55 uint64 downloadSize,
56 ::std::chrono::milliseconds duration
57 );
58
59 MCNAPI static ::std::chrono::milliseconds getElapsedTime(::CodeBuilderPerformance::Stage stage);
60
61 MCNAPI_C static void setCodeBuilderSessionId();
62
63 MCNAPI static ::std::string toString(::CodeBuilderPerformance::Stage stage);
64
65 MCNAPI static void updateLastTimestamp();
66 // NOLINTEND
67
68public:
69 // static variables
70 // NOLINTBEGIN
71 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCacheCodeScreenTimeStart();
72
73 MCNAPI static ::std::string& mCodeBuilderProjectId();
74
75 MCNAPI static ::std::string& mCodeBuilderSessionId();
76
77 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCodeRunStart();
78
79 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCreateNewProjectTimeStart();
80
81 MCNAPI static ::std::string& mEditorName();
82
83 MCNAPI static ::std::bitset<8>& mFlags();
84
85 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mLastTimestamp();
86
87 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mProjectLoadTimeStart();
88
89 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mTutorialLoadTimeStart();
90
91 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mWebviewLoadTimeStart();
92 // NOLINTEND
93};
Definition CodeBuilderPerformance.h:10
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mWebviewLoadTimeStart()
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mProjectLoadTimeStart()
static MCAPI void fireCodeBuilderLoadPerformanceEvent(::IMinecraftEventing const *eventing, ::CodeBuilderPerformance::Stage stage, ::std::string_view codeProjectId, uint64 tutorialSize, uint64 downloadSize, ::std::chrono::milliseconds duration)
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mCodeRunStart()
static MCAPI ::std::string & mCodeBuilderSessionId()
static MCAPI ::std::string & mCodeBuilderProjectId()
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mTutorialLoadTimeStart()
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mLastTimestamp()
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mCreateNewProjectTimeStart()
static MCAPI ::std::chrono::milliseconds getElapsedTime(::CodeBuilderPerformance::Stage stage)
static MCAPI ::std::string toString(::CodeBuilderPerformance::Stage stage)
static MCAPI void updateLastTimestamp()
static MCAPI ::std::string & mEditorName()
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mCacheCodeScreenTimeStart()
static MCAPI ::std::bitset< 8 > & mFlags()
Definition IMinecraftEventing.h:137