File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
packages/utils/src/lib/profiler Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -381,11 +381,13 @@ export class NodejsProfiler<
381381 }
382382}
383383
384- export function getNodeJSProfiler <
385- Tracks extends Record < string , ActionTrackEntryPayload > ,
386- > (
387- options : NodejsProfilerOptionsDefault < Tracks > ,
388- ) : NodejsProfiler < TraceEvent , Tracks > ;
384+ export function getTraceEventProfilerFormat ( ) {
385+ return {
386+ ...getTraceEventWalFormat ( ) ,
387+ encodePerfEntry : entryToTraceEvents ,
388+ } ;
389+ }
390+
389391export function getNodeJSProfiler <
390392 DomainEvents extends TraceEvent & WalRecord ,
391393 Tracks extends Record < string , ActionTrackEntryPayload > ,
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828import {
2929 NodejsProfiler ,
3030 type NodejsProfilerOptionsWithFormat ,
31+ getTraceEventProfilerFormat ,
3132} from './profiler-node.js' ;
3233import { Profiler , getProfilerId } from './profiler.js' ;
3334import { entryToTraceEvents } from './trace-file-utils.js' ;
@@ -98,8 +99,7 @@ const createProfiler = (
9899 track : opts . track ?? 'int-test-track' ,
99100 groupId : opts . measureName ,
100101 format : {
101- ...traceEventWalFormat ,
102- encodePerfEntry : entryToTraceEvents ,
102+ ...getTraceEventProfilerFormat ( ) ,
103103 baseName : opts . format ?. baseName ?? PROFILER_PERSIST_BASENAME ,
104104 } ,
105105 enabled : opts . enabled ?? true ,
You can’t perform that action at this time.
0 commit comments