BenchmarkResult class
单项基准测试结果 / Result of a single micro-benchmark.
Constructors
- BenchmarkResult({required String testName, required int iterations, required Duration totalDuration, required Duration averageDuration, required Duration minDuration, required Duration maxDuration, required Duration standardDeviation, required double operationsPerSecond, required DateTime timestamp, int failures = 0})
-
构造 BenchmarkResult / Creates a BenchmarkResult.
const
-
BenchmarkResult.fromSamples({required String testName, required List<
int> samples, required Duration totalDuration, required DateTime timestamp, int failures = 0}) -
由耗时样本计算统计量 / Computes the statistics from raw samples.
factory
Properties
- averageDuration → Duration
-
单次平均耗时 / Mean duration of one iteration.
final
- failures → int
-
抛出异常的迭代次数 / Iterations that threw.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- iterations → int
-
有效迭代次数 / Number of successful iterations.
final
- maxDuration → Duration
-
单次最长耗时 / Slowest iteration.
final
- minDuration → Duration
-
单次最短耗时 / Fastest iteration.
final
- operationsPerSecond → double
-
每秒可执行次数 / Throughput expressed as operations per second.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- standardDeviation → Duration
-
耗时标准差 / Standard deviation of the iteration durations.
final
- testName → String
-
测试名称 / Name of the benchmark.
final
- timestamp → DateTime
-
完成时间 / Completion timestamp.
final
- totalDuration → Duration
-
有效迭代总耗时 / Total time spent in successful iterations.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> - 序列化为可 JSON 编码的 Map / Serialises to a JSON encodable map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited