Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: align PerformanceState class name with conventions #32539

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ inline const Mutex& Environment::extra_linked_bindings_mutex() const {
return extra_linked_bindings_mutex_;
}

inline performance::performance_state* Environment::performance_state() {
inline performance::PerformanceState* Environment::performance_state() {
return performance_state_.get();
}

Expand Down
2 changes: 1 addition & 1 deletion src/env.cc
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ Environment::Environment(IsolateData* isolate_data,
this);

performance_state_ =
std::make_unique<performance::performance_state>(isolate());
std::make_unique<performance::PerformanceState>(isolate());
performance_state_->Mark(
performance::NODE_PERFORMANCE_MILESTONE_ENVIRONMENT);
performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_NODE_START,
Expand Down
6 changes: 3 additions & 3 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class FileHandleReadWrap;
}

namespace performance {
class performance_state;
class PerformanceState;
}

namespace tracing {
Expand Down Expand Up @@ -1016,7 +1016,7 @@ class Environment : public MemoryRetainer {
inline std::vector<std::unique_ptr<fs::FileHandleReadWrap>>&
file_handle_read_wrap_freelist();

inline performance::performance_state* performance_state();
inline performance::PerformanceState* performance_state();
inline std::unordered_map<std::string, uint64_t>* performance_marks();

void CollectUVExceptionInfo(v8::Local<v8::Value> context,
Expand Down Expand Up @@ -1325,7 +1325,7 @@ class Environment : public MemoryRetainer {

AliasedInt32Array stream_base_state_;

std::unique_ptr<performance::performance_state> performance_state_;
std::unique_ptr<performance::PerformanceState> performance_state_;
std::unordered_map<std::string, uint64_t> performance_marks_;

bool has_run_bootstrapping_code_ = false;
Expand Down
6 changes: 3 additions & 3 deletions src/node_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const uint64_t timeOrigin = PERFORMANCE_NOW();
const double timeOriginTimestamp = GetCurrentTimeInMicroseconds();
uint64_t performance_v8_start;

void performance_state::Mark(enum PerformanceMilestone milestone,
void PerformanceState::Mark(enum PerformanceMilestone milestone,
uint64_t ts) {
this->milestones[milestone] = ts;
TRACE_EVENT_INSTANT_WITH_TIMESTAMP0(
Expand Down Expand Up @@ -267,7 +267,7 @@ void MarkGarbageCollectionEnd(Isolate* isolate,
GCCallbackFlags flags,
void* data) {
Environment* env = static_cast<Environment*>(data);
performance_state* state = env->performance_state();
PerformanceState* state = env->performance_state();
// If no one is listening to gc performance entries, do not create them.
if (!state->observers[NODE_PERFORMANCE_ENTRY_TYPE_GC])
return;
Expand Down Expand Up @@ -553,7 +553,7 @@ void Initialize(Local<Object> target,
void* priv) {
Environment* env = Environment::GetCurrent(context);
Isolate* isolate = env->isolate();
performance_state* state = env->performance_state();
PerformanceState* state = env->performance_state();

target->Set(context,
FIXED_ONE_BYTE_STRING(isolate, "observerCounts"),
Expand Down
4 changes: 2 additions & 2 deletions src/node_perf_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ enum PerformanceEntryType {
NODE_PERFORMANCE_ENTRY_TYPE_INVALID
};

class performance_state {
class PerformanceState {
public:
explicit performance_state(v8::Isolate* isolate) :
explicit PerformanceState(v8::Isolate* isolate) :
root(
isolate,
sizeof(performance_state_internal)),
Expand Down