diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2021-06-08 19:19:04 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2021-06-28 11:20:15 +0300 |
commit | 50cfbf9f77ff1625f235d2ec9a31e409028b899d (patch) | |
tree | a6625e66a949dee03a8c8fb4ee5eb6f04dbbc888 /src/histogram.cc | |
parent | a75d4e272481dfaa1353a063a27baf035a6cc37a (diff) |
bootstrap: support perf hooks in snapshot
PR-URL: https://github.com/nodejs/node/pull/38971
Refs: https://github.com/nodejs/node/issues/35711
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/histogram.cc')
-rw-r--r-- | src/histogram.cc | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/histogram.cc b/src/histogram.cc index d21cf2883a0..6fbb0eda6c0 100644 --- a/src/histogram.cc +++ b/src/histogram.cc @@ -1,8 +1,10 @@ #include "histogram.h" // NOLINT(build/include_inline) -#include "histogram-inl.h" #include "base_object-inl.h" +#include "histogram-inl.h" #include "memory_tracker-inl.h" #include "node_errors.h" +#include "node_external_reference.h" + namespace node { using v8::BigInt; @@ -197,6 +199,21 @@ Local<FunctionTemplate> HistogramBase::GetConstructorTemplate( return tmpl; } +void HistogramBase::RegisterExternalReferences( + ExternalReferenceRegistry* registry) { + registry->Register(New); + registry->Register(GetExceeds); + registry->Register(GetMin); + registry->Register(GetMax); + registry->Register(GetMean); + registry->Register(GetStddev); + registry->Register(GetPercentile); + registry->Register(GetPercentiles); + registry->Register(DoReset); + registry->Register(Record); + registry->Register(RecordDelta); +} + void HistogramBase::Initialize(Environment* env, Local<Object> target) { env->SetConstructorFunction(target, "Histogram", GetConstructorTemplate(env)); } @@ -240,6 +257,20 @@ Local<FunctionTemplate> IntervalHistogram::GetConstructorTemplate( return tmpl; } +void IntervalHistogram::RegisterExternalReferences( + ExternalReferenceRegistry* registry) { + registry->Register(GetExceeds); + registry->Register(GetMin); + registry->Register(GetMax); + registry->Register(GetMean); + registry->Register(GetStddev); + registry->Register(GetPercentile); + registry->Register(GetPercentiles); + registry->Register(DoReset); + registry->Register(Start); + registry->Register(Stop); +} + IntervalHistogram::IntervalHistogram( Environment* env, Local<Object> wrap, |