File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed
.benchmarkBaselines/ExternalBenchmarks/bdb4ef08
Benchmarks/ExternalBenchmarks Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -19,11 +19,19 @@ let benchmarks = {
19
19
Benchmark . defaultConfiguration. maxDuration = . seconds( 1 ) // Default = 1 second
20
20
Benchmark . defaultConfiguration. metrics = [ . throughput, . wallClock]
21
21
22
+ Benchmark ( " disk2d " ) { benchmark in
23
+ var poisson = DiskSampler2D ( seed: 0 )
24
+ for _ in benchmark. scaledIterations {
25
+ blackHole ( poisson. generate ( radius: 10 , width: viewer_size, height: viewer_size) )
26
+ }
27
+ }
28
+
22
29
Benchmark ( " cell2d " ) { benchmark in
23
30
for _ in benchmark. scaledIterations {
24
31
blackHole ( CellNoise2D ( amplitude: 255 , frequency: 0.01 ) )
25
32
}
26
33
}
34
+
27
35
Benchmark ( " cell3d " ) { benchmark in
28
36
for _ in benchmark. scaledIterations {
29
37
blackHole ( CellNoise3D ( amplitude: 255 , frequency: 0.01 ) )
Original file line number Diff line number Diff line change @@ -8,3 +8,39 @@ in order avoid adding transitive dependencies.
8
8
To run the benchmarks, invoke the following command:
9
9
10
10
swift package benchmark
11
+
12
+ ## Using Benchmarks
13
+
14
+ - [ Documentation for the package] ( https://swiftpackageindex.com/ordo-one/package-benchmark/documentation/benchmark/gettingstarted )
15
+ - [ Creating and Comparing Baselines] ( https://swiftpackageindex.com/ordo-one/package-benchmark/documentation/benchmark/creatingandcomparingbaselines )
16
+ - [ Exporting Benchmark Results] ( https://swiftpackageindex.com/ordo-one/package-benchmark/documentation/benchmark/exportingbenchmarks )
17
+
18
+ ## Baselines
19
+
20
+ The baselines are set by commit hash (first 8 hex characters) or (in the future) tag with this work in place.
21
+ The initial baseline is ` bdb4ef08 ` .
22
+ It builds on the tag ` 1.0.0 ` with updates to dependencies and Swift versions and no functional code changes.
23
+
24
+ ``` bash
25
+ swift package --allow-writing-to-package-directory benchmark baseline update bdb4ef08
26
+ ```
27
+
28
+ To compare current development branch against this baseline, run the following command from this sub-project in the terminal:
29
+
30
+ ``` bash
31
+ swift package benchmark baseline compare bdb4ef08
32
+ ```
33
+
34
+ The output defaults to plain text. If you'd like markdown output, for pasting into a pull request, add ` --format markdown ` to the command.
35
+
36
+ For a summary comparison, use the command:
37
+
38
+ ``` bash
39
+ swift package benchmark baseline check --check-absolute
40
+ ```
41
+
42
+ ### Stored Baselines
43
+
44
+ ` bdb4ef08 ` : M1 macbook pro, 16GB ram, running only iTerm2
45
+
46
+
You can’t perform that action at this time.
0 commit comments