Skip to content

Commit e066584

Browse files
addaleaxtargos
authored andcommitted
src: align PerformanceState class name with conventions
Class names are written in UpperCamelCase. Otherwise, this looks like it’s a variable, not a class name. PR-URL: #32539 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 78b90d9 commit e066584

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/env-inl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@ inline const Mutex& Environment::extra_linked_bindings_mutex() const {
944944
return extra_linked_bindings_mutex_;
945945
}
946946

947-
inline performance::performance_state* Environment::performance_state() {
947+
inline performance::PerformanceState* Environment::performance_state() {
948948
return performance_state_.get();
949949
}
950950

src/env.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Environment::Environment(IsolateData* isolate_data,
348348
this);
349349

350350
performance_state_ =
351-
std::make_unique<performance::performance_state>(isolate());
351+
std::make_unique<performance::PerformanceState>(isolate());
352352
performance_state_->Mark(
353353
performance::NODE_PERFORMANCE_MILESTONE_ENVIRONMENT);
354354
performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_NODE_START,

src/env.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class FileHandleReadWrap;
6464
}
6565

6666
namespace performance {
67-
class performance_state;
67+
class PerformanceState;
6868
}
6969

7070
namespace tracing {
@@ -1016,7 +1016,7 @@ class Environment : public MemoryRetainer {
10161016
inline std::vector<std::unique_ptr<fs::FileHandleReadWrap>>&
10171017
file_handle_read_wrap_freelist();
10181018

1019-
inline performance::performance_state* performance_state();
1019+
inline performance::PerformanceState* performance_state();
10201020
inline std::unordered_map<std::string, uint64_t>* performance_marks();
10211021

10221022
void CollectUVExceptionInfo(v8::Local<v8::Value> context,
@@ -1323,7 +1323,7 @@ class Environment : public MemoryRetainer {
13231323

13241324
AliasedInt32Array stream_base_state_;
13251325

1326-
std::unique_ptr<performance::performance_state> performance_state_;
1326+
std::unique_ptr<performance::PerformanceState> performance_state_;
13271327
std::unordered_map<std::string, uint64_t> performance_marks_;
13281328

13291329
bool has_run_bootstrapping_code_ = false;

src/node_perf.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const uint64_t timeOrigin = PERFORMANCE_NOW();
4444
const double timeOriginTimestamp = GetCurrentTimeInMicroseconds();
4545
uint64_t performance_v8_start;
4646

47-
void performance_state::Mark(enum PerformanceMilestone milestone,
47+
void PerformanceState::Mark(enum PerformanceMilestone milestone,
4848
uint64_t ts) {
4949
this->milestones[milestone] = ts;
5050
TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(
@@ -267,7 +267,7 @@ void MarkGarbageCollectionEnd(Isolate* isolate,
267267
GCCallbackFlags flags,
268268
void* data) {
269269
Environment* env = static_cast<Environment*>(data);
270-
performance_state* state = env->performance_state();
270+
PerformanceState* state = env->performance_state();
271271
// If no one is listening to gc performance entries, do not create them.
272272
if (!state->observers[NODE_PERFORMANCE_ENTRY_TYPE_GC])
273273
return;
@@ -553,7 +553,7 @@ void Initialize(Local<Object> target,
553553
void* priv) {
554554
Environment* env = Environment::GetCurrent(context);
555555
Isolate* isolate = env->isolate();
556-
performance_state* state = env->performance_state();
556+
PerformanceState* state = env->performance_state();
557557

558558
target->Set(context,
559559
FIXED_ONE_BYTE_STRING(isolate, "observerCounts"),

src/node_perf_common.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ enum PerformanceEntryType {
5252
NODE_PERFORMANCE_ENTRY_TYPE_INVALID
5353
};
5454

55-
class performance_state {
55+
class PerformanceState {
5656
public:
57-
explicit performance_state(v8::Isolate* isolate) :
57+
explicit PerformanceState(v8::Isolate* isolate) :
5858
root(
5959
isolate,
6060
sizeof(performance_state_internal)),

0 commit comments

Comments
 (0)