File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -596,7 +596,7 @@ void ELDHistogram::Start(const FunctionCallbackInfo<Value>& args) {
596596}
597597
598598void ELDHistogram::FastStart (Local<Value> receiver, bool reset) {
599- TRACK_V8_FAST_API_CALL (" histogram.start" );
599+ TRACK_V8_FAST_API_CALL (" histogram.eventLoopDelay. start" );
600600 ELDHistogram* histogram;
601601 ASSIGN_OR_RETURN_UNWRAP (&histogram, receiver);
602602 histogram->OnStart (reset ? StartFlags::RESET : StartFlags::NONE );
@@ -609,7 +609,7 @@ void ELDHistogram::Stop(const FunctionCallbackInfo<Value>& args) {
609609}
610610
611611void ELDHistogram::FastStop (Local<Value> receiver) {
612- TRACK_V8_FAST_API_CALL (" histogram.stop" );
612+ TRACK_V8_FAST_API_CALL (" histogram.eventLoopDelay. stop" );
613613 ELDHistogram* histogram;
614614 ASSIGN_OR_RETURN_UNWRAP (&histogram, receiver);
615615 histogram->OnStop ();
Original file line number Diff line number Diff line change 1+ // Flags: --allow-natives-syntax --expose-internals --no-warnings
2+ 'use strict' ;
3+
4+ const common = require ( '../common' ) ;
5+ const assert = require ( 'assert' ) ;
6+
7+ const { internalBinding } = require ( 'internal/test/binding' ) ;
8+ const { createELDHistogram } = internalBinding ( 'performance' ) ;
9+
10+ const histogram = createELDHistogram ( 1 , true ) ;
11+
12+ function testFastMethods ( ) {
13+ histogram . start ( true ) ;
14+ histogram . stop ( ) ;
15+ }
16+
17+ eval ( '%PrepareFunctionForOptimization(testFastMethods)' ) ;
18+ testFastMethods ( ) ;
19+ eval ( '%OptimizeFunctionOnNextCall(testFastMethods)' ) ;
20+ testFastMethods ( ) ;
21+
22+ if ( common . isDebug ) {
23+ const { getV8FastApiCallCount } = internalBinding ( 'debug' ) ;
24+ assert . strictEqual ( getV8FastApiCallCount ( 'histogram.eventLoopDelay.start' ) , 1 ) ;
25+ assert . strictEqual ( getV8FastApiCallCount ( 'histogram.eventLoopDelay.stop' ) , 1 ) ;
26+ }
You can’t perform that action at this time.
0 commit comments