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

perf_hooks: remove useless calls in Histogram #41579

Closed
wants to merge 2 commits into from
Closed
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
Next Next commit
perf_hooks: remove useless calls in Histogram
Coverity reported some calls that had no effect,
remove them

Signed-off-by: Michael Dawson <[email protected]>
mhdawson committed Jan 18, 2022
commit 54066bd10709958efa6ff599d8b139bb8f3d6ed5
8 changes: 4 additions & 4 deletions src/histogram.cc
Original file line number Diff line number Diff line change
@@ -162,7 +162,7 @@ void HistogramBase::GetPercentiles(const FunctionCallbackInfo<Value>& args) {
map->Set(
env->context(),
Number::New(env->isolate(), key),
Number::New(env->isolate(), static_cast<double>(value))).IsEmpty();
Number::New(env->isolate(), static_cast<double>(value)));
});
}

@@ -177,7 +177,7 @@ void HistogramBase::GetPercentilesBigInt(
map->Set(
env->context(),
Number::New(env->isolate(), key),
BigInt::New(env->isolate(), value)).IsEmpty();
BigInt::New(env->isolate(), value));
});
}

@@ -592,7 +592,7 @@ void IntervalHistogram::GetPercentiles(
map->Set(
env->context(),
Number::New(env->isolate(), key),
Number::New(env->isolate(), static_cast<double>(value))).IsEmpty();
Number::New(env->isolate(), static_cast<double>(value)));
});
}

@@ -607,7 +607,7 @@ void IntervalHistogram::GetPercentilesBigInt(
map->Set(
env->context(),
Number::New(env->isolate(), key),
BigInt::New(env->isolate(), value)).IsEmpty();
BigInt::New(env->isolate(), value));
});
}