Skip to content

Commit c1eb5cc

Browse files
committed
Amended docs.
1 parent 5d575bd commit c1eb5cc

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ the enclosing group.
217217
## Score Sampling
218218

219219
For more information about benchmark score sampling see the dedicated [section](
220-
https://github.com/simphotonics/benchmark_runner/gnuplot
220+
https://github.com/simphotonics/benchmark_runner/tree/main/gnuplot
221221
).
222222

223223

example/README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ Write inline benchmarks using the functions:
2222
asynchronous benchmarks.
2323

2424
```Dart
25-
// ignore_for_file: unused_local_variable
26-
2725
import 'package:benchmark_runner/benchmark_runner.dart';
2826
2927
/// Returns the value [t] after waiting for [duration].
@@ -32,14 +30,15 @@ Write inline benchmarks using the functions:
3230
}
3331
3432
void main(List<String> args) async {
35-
await group('Wait for duration', () async {
33+
34+
await group('Wait for duration', () async {
3635
await asyncBenchmark('10ms', () async {
3736
await later<int>(39, Duration(milliseconds: 10));
3837
});
3938
4039
await asyncBenchmark('5ms', () async {
4140
await later<int>(27, Duration(milliseconds: 5));
42-
}, emitStats: false);
41+
}, scoreEmitter: MeanEmitter());
4342
});
4443
4544
group('Set', () async {
@@ -50,11 +49,8 @@ Write inline benchmarks using the functions:
5049
benchmark('construct', () {
5150
final set = {for (var i = 0; i < 1000; ++i) i};
5251
});
53-
54-
throw 'Error in group';
5552
});
5653
}
57-
5854
```
5955
Run a *single* benchmark file as an executable:
6056
```Console
@@ -66,7 +62,7 @@ by calling the benchmark_runner and specifying a directory.
6662
If no directory or file name is specified, then it defaults to `benchmark`:
6763

6864
```Console
69-
$ dart run benchmark_runner
65+
$ dart run benchmark_runner report
7066
```
7167

7268
## Features and bugs

gnuplot/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Introduction
66

77
When benchmarking a function, one has to take into consideration that
8-
the test is not performed on an isolated system that is only handling the
8+
the benchmark is not performed on an isolated system that is only handling the
99
instructions provided by our piece of code. Instead, the CPUs is very likely
1010
busy performing other tasks before eventually executing the benchmarked code.
1111
This introduces latency that is typically larger for the first few runs
@@ -15,9 +15,8 @@ where the first few runs are discarded.
1515

1616
A second factor to consider are systematic measuring errors due to the fact
1717
that it takes (a small amount of) time to increment loop counters, perform
18-
loop checks, or access the elapsed time.
19-
20-
The overhead introduced by repeatedly accessing the
18+
loop checks, or access the elapsed time. The overhead introduced by
19+
repeatedly accessing the
2120
elapsed time can be reduced by averaging the
2221
benchmark score over many runs.
2322

@@ -47,7 +46,7 @@ in microseconds.
4746
For short run times below 1 microsecond each score sample is generated
4847
using the functions [`measure`][measure] or the equivalent
4948
asynchronous method [`measureAsync`][measureAsync]. The cyan curve shows
50-
approx. over how many runs a score entry is averaged.
49+
over how many runs each score entry is averaged.
5150

5251
### Custom Sampling Method
5352

0 commit comments

Comments
 (0)