diff --git a/ts/src/index.ts b/ts/src/index.ts index 51cceddb..42454629 100644 --- a/ts/src/index.ts +++ b/ts/src/index.ts @@ -40,6 +40,7 @@ export const time = { v8ProfilerStuckEventLoopDetected: timeProfiler.v8ProfilerStuckEventLoopDetected, getState: timeProfiler.getState, + getMetrics: timeProfiler.getMetrics, constants: timeProfiler.constants, }; diff --git a/ts/test/test-time-profiler.ts b/ts/test/test-time-profiler.ts index 1c887525..d7359578 100644 --- a/ts/test/test-time-profiler.ts +++ b/ts/test/test-time-profiler.ts @@ -16,7 +16,7 @@ import delay from 'delay'; import * as sinon from 'sinon'; -import * as time from '../src/time-profiler'; +import {time, getNativeThreadId} from '../src'; import * as v8TimeProfiler from '../src/time-profiler-bindings'; import {timeProfile, v8TimeProfile} from './profiles-for-tests'; import {hrtime} from 'process'; @@ -739,7 +739,7 @@ describe('Time Profiler', () => { describe('getNativeThreadId', () => { it('should return a number', () => { - const threadId = time.getNativeThreadId(); + const threadId = getNativeThreadId(); assert.ok(typeof threadId === 'number'); assert.ok(threadId > 0); });