CockpitIsolateProfile constructor

CockpitIsolateProfile({
  1. CockpitIsolateStats? before,
  2. CockpitIsolateStats? after,
  3. Iterable<CockpitIsolateStats> beforeAll = const <CockpitIsolateStats>[],
  4. Iterable<CockpitIsolateStats> afterAll = const <CockpitIsolateStats>[],
  5. int droppedBefore = 0,
  6. int droppedAfter = 0,
  7. Iterable<CockpitIsolateEvent> events = const <CockpitIsolateEvent>[],
  8. int droppedEvents = 0,
})

Implementation

CockpitIsolateProfile({
  this.before,
  this.after,
  Iterable<CockpitIsolateStats> beforeAll = const <CockpitIsolateStats>[],
  Iterable<CockpitIsolateStats> afterAll = const <CockpitIsolateStats>[],
  this.droppedBefore = 0,
  this.droppedAfter = 0,
  Iterable<CockpitIsolateEvent> events = const <CockpitIsolateEvent>[],
  this.droppedEvents = 0,
}) : beforeAll = List<CockpitIsolateStats>.unmodifiable(beforeAll),
     afterAll = List<CockpitIsolateStats>.unmodifiable(afterAll),
     events = List<CockpitIsolateEvent>.unmodifiable(events) {
  if (droppedBefore < 0 ||
      droppedAfter < 0 ||
      droppedEvents < 0 ||
      this.beforeAll.length > 64 ||
      this.afterAll.length > 64 ||
      this.events.length > 1000) {
    throw const FormatException('Isolate profile bounds are invalid.');
  }
}