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 ::WebviewObserver const* eventing,
52 ::CodeBuilderPerformance::Stage stage,
53 ::std::string_view codeProjectId,
54 uint64 tutorialSize,
55 uint64 downloadSize,
56 ::std::chrono::milliseconds duration
57 );
58
60 ::WebviewObserver const& eventing,
61 ::CodeBuilderPerformance::Stage stage,
62 ::std::string_view codeProjectId,
63 ::std::chrono::milliseconds duration
64 );
65
66 MCNAPI static ::std::string const getCodeBuilderSessionId();
67
68 MCNAPI static ::std::string const getCodeProjectId();
69
70 MCNAPI static ::std::string const getEditorName();
71
72 MCNAPI static ::std::chrono::milliseconds getElapsedTime(::CodeBuilderPerformance::Stage stage);
73
74#ifdef LL_PLAT_C
75 MCNAPI static void setCodeBuilderSessionId();
76#endif
77
78 MCNAPI static void setTimeStart(::CodeBuilderPerformance::Stage stage);
79
80 MCNAPI static ::std::string toString(::CodeBuilderPerformance::Stage stage);
81 // NOLINTEND
82
83public:
84 // static variables
85 // NOLINTBEGIN
86 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCacheCodeScreenTimeStart();
87
88 MCNAPI static ::std::string& mCodeBuilderProjectId();
89
90 MCNAPI static ::std::string& mCodeBuilderSessionId();
91
92 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCodeRunStart();
93
94 MCNAPI static ::std::string& mEditorName();
95
96 MCNAPI static ::std::bitset<8>& mFlags();
97
98 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mLastTimestamp();
99
100 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mProjectLoadTimeStart();
101
102 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mTutorialLoadTimeStart();
103
104 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mWebviewLoadTimeStart();
105 // NOLINTEND
106};
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 ::std::optional<::std::chrono::steady_clock::time_point > & mCodeRunStart()
static MCAPI void fireCodeBuilderLoadPerformanceEvent(::WebviewObserver const *eventing, ::CodeBuilderPerformance::Stage stage, ::std::string_view codeProjectId, uint64 tutorialSize, uint64 downloadSize, ::std::chrono::milliseconds duration)
static MCAPI ::std::string & mCodeBuilderSessionId()
static MCAPI ::std::string & mCodeBuilderProjectId()
static MCAPI ::std::string const getCodeProjectId()
static MCAPI void fireCodeBuilderRunPerformanceEvent(::WebviewObserver const &eventing, ::CodeBuilderPerformance::Stage stage, ::std::string_view codeProjectId, ::std::chrono::milliseconds duration)
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::string const getCodeBuilderSessionId()
static MCAPI ::std::string const getEditorName()
static MCAPI void setTimeStart(::CodeBuilderPerformance::Stage stage)
static MCAPI ::std::chrono::milliseconds getElapsedTime(::CodeBuilderPerformance::Stage stage)
static MCAPI ::std::string toString(::CodeBuilderPerformance::Stage stage)
static MCAPI ::std::string & mEditorName()
static MCAPI ::std::optional<::std::chrono::steady_clock::time_point > & mCacheCodeScreenTimeStart()
static MCAPI ::std::bitset< 8 > & mFlags()
Definition WebviewObserver.h:15