File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1515 */
1616
1717import delay from 'delay' ;
18+ import type { perftools } from '../../proto/profile' ;
1819
1920import { serializeTimeProfile } from './profile-serializer' ;
2021import { SourceMapper } from './sourcemapper/sourcemapper' ;
@@ -39,7 +40,9 @@ export interface TimeProfilerOptions {
3940 sourceMapper ?: SourceMapper ;
4041}
4142
42- export async function profile ( options : TimeProfilerOptions ) {
43+ export async function profile (
44+ options : TimeProfilerOptions
45+ ) : Promise < perftools . profiles . IProfile > {
4346 const stop = await start (
4447 options . intervalMicros || DEFAULT_INTERVAL_MICROS ,
4548 options . sourceMapper
@@ -51,7 +54,7 @@ export async function profile(options: TimeProfilerOptions) {
5154export async function start (
5255 intervalMicros : Microseconds = DEFAULT_INTERVAL_MICROS ,
5356 sourceMapper ?: SourceMapper
54- ) {
57+ ) : Promise < ( ) => Promise < perftools . profiles . IProfile > > {
5558 if ( profiling ) {
5659 throw new Error ( 'already profiling' ) ;
5760 }
You can’t perform that action at this time.
0 commit comments