Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yjbanov/bfb52443c2f7db0121c55ecb4ed02f72 to your computer and use it in GitHub Desktop.
Save yjbanov/bfb52443c2f7db0121c55ecb4ed02f72 to your computer and use it in GitHub Desktop.
/// The names for the values computed for each [BenchmarkMetric].
enum BenchmarkMetricComputation {
/// The name for the computed value tracking the average value of the measured
/// samples without outliers.
average,
/// The name for the computed value tracking the average of outlier samples.
outlierAverage,
/// The name for the computed value tracking the outlier average divided by
/// the clean average.
outlierRatio,
/// The name for the computed value tracking the noise as a multiple of the
/// [average] value takes from clean samples.
noise,
/// The name for the computed value tracking the 50th percentile value from
/// the samples with outliers.
p50(0.5),
/// The name for the computed value tracking the 90th percentile value from
/// the samples with outliers.
p90(0.9),
/// The name for the computed value tracking the 95th percentile value from
/// the samples with outliers.
p95(0.95);
const BenchmarkMetricComputation([this.percentile]);
final double? percentile;
static final List<BenchmarkMetricComputation> percentileValues = values
.where((BenchmarkMetricComputation value) => value.percentile != null)
.toList();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment