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::chrono::milliseconds getElapsedTime(::CodeBuilderPerformance::Stage stage);
67
68 MCNAPI static void setCodeBuilderSessionId();
69
70 MCNAPI static ::std::string toString(::CodeBuilderPerformance::Stage stage);
71
72 MCNAPI static void updateLastTimestamp();
73 // NOLINTEND
74
75public:
76 // static variables
77 // NOLINTBEGIN
78 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCacheCodeScreenTimeStart();
79
80 MCNAPI static ::std::string& mCodeBuilderProjectId();
81
82 MCNAPI static ::std::string& mCodeBuilderSessionId();
83
84 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCodeRunStart();
85
86 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mCreateNewProjectTimeStart();
87
88 MCNAPI static ::std::string& mEditorName();
89
90 MCNAPI static ::std::bitset<8>& mFlags();
91
92 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mLastTimestamp();
93
94 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mProjectLoadTimeStart();
95
96 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mTutorialLoadTimeStart();
97
98 MCNAPI static ::std::optional<::std::chrono::steady_clock::time_point>& mWebviewLoadTimeStart();
99 // NOLINTEND
100};
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 setCodeBuilderSessionId()
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 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::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 WebviewObserver.h:15