message: Add timedExec* wrapper for simple PerformanceEvent case
diff: @@ -474,6 +474,38 @@ export class PerformanceEvent {
  return new PerformanceEvent(logger, event);
  }
  + public static timedExec<T>(
  + logger: ITelemetryLogger,
  + event: ITelemetryGenericEvent,
  + callback: () => T,
  + ) {
  + const perfEvent = PerformanceEvent.start(logger, event);
  + try {
  + const ret = callback();
  + perfEvent.end();
  + return ret;
  + } catch (error) {
  + perfEvent.cancel(undefined, error);
  + throw error;
  + }
  + }
  +
  + public static async timedExecAsync<T>(
  + logger: ITelemetryLogger,
  + event: ITelemetryGenericEvent,
  + callback: () => Promise<T>,
  + ) {
  + const perfEvent = PerformanceEvent.start(logger, event);
  + try {
  + const ret = await callback();
  + perfEvent.end();
  + return ret;
  + } catch (error) {
  + perfEvent.cancel(undefined, error);
  + throw error;
  + }
  + }
  +
  private event?: ITelemetryGenericEvent;
  private readonly startTime = performanceNow();
  private startMark?: string;
  