Skip to content

Expose timeStart/timeEnd/timeAsync helpers to emitter context #9481

@timotheeguerin

Description

@timotheeguerin
export function $onEmit(context) {
   context.timeStart("step1")
   // do work
   context.timeEnd("step1");

  context.timeAsync("step2", () => doStep2()); 
}

which then when running tsp compile . --stats would include those steps under the emitter time

probably also need a reportTime with a custom tracking or maybe only that so that it can be included in the result of some emitter API and not have to be forced into passing the context around

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions