add method

void add(
  1. double value, {
  2. required bool isWarmUpValue,
})

Adds a value to this timeseries.

Implementation

void add(double value, {required bool isWarmUpValue}) {
  if (value < 0.0) {
    throw StateError(
      'Timeseries $name: negative metric values are not supported. Got: $value',
    );
  }
  _allValues.add(value);
  if (useCustomWarmUp && isWarmUpValue) {
    _warmUpFrameCount = warmUpFrameCount + 1;
  }
}