BenchmarkResult constructor

BenchmarkResult({
  1. required String label,
  2. required DateTime timestamp,
  3. required List<MeasurementSeries> series,
  4. String type = flutterProfileType,
})

Implementation

BenchmarkResult({
  required this.label,
  required this.timestamp,
  required this.series,
  this.type = flutterProfileType,
})  : assert(timestamp.isUtc, 'Timestamp must be in UTC'),
      assert(
          type.length == _typeStringLength,
          'Type must be exactly $_typeStringLength characters long. '
          'Feel free to pad with spaces') {
  if (series.isEmpty) {
    throw Exception('BenchmarkResult cannot be created with zero series');
  }
}