stopPerformance method

Future<CockpitPerformanceReport> stopPerformance()

Implementation

Future<CockpitPerformanceReport> stopPerformance() async {
  final session = _activePerformanceSession;
  if (session == null || !performanceCollector.isRunning) {
    throw StateError('No performance capture is active.');
  }
  try {
    return performanceCollector.stop(stepId: session.request.name);
  } finally {
    _activePerformanceSession = null;
  }
}