Skip to content
Merged
Changes from 1 commit
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
14 changes: 1 addition & 13 deletions src/node_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,18 +236,6 @@ static void RemoveGarbageCollectionTracking(
GarbageCollectionCleanupHook(env);
}

// Gets the name of a function
inline Local<Value> GetName(Local<Function> fn) {
Local<Value> val = fn->GetDebugName();
if (val.IsEmpty() || val->IsUndefined()) {
Local<Value> boundFunction = fn->GetBoundFunction();
if (!boundFunction.IsEmpty() && !boundFunction->IsUndefined()) {
val = GetName(boundFunction.As<Function>());
}
}
return val;
}

// Notify a custom PerformanceEntry to observers
void Notify(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Expand Down Expand Up @@ -277,7 +265,7 @@ void CreateELDHistogram(const FunctionCallbackInfo<Value>& args) {
IntervalHistogram::Create(env, interval, [](Histogram& histogram) {
uint64_t delta = histogram.RecordDelta();
TRACE_COUNTER1(TRACING_CATEGORY_NODE2(perf, event_loop),
"delay", delta);
"delay", delta);
TRACE_COUNTER1(TRACING_CATEGORY_NODE2(perf, event_loop),
"min", histogram.Min());
TRACE_COUNTER1(TRACING_CATEGORY_NODE2(perf, event_loop),
Expand Down