Mercurial > repos > public > sbplib_julia
comparison README.md @ 1378:2b5480e2d4bf tooling/benchmarks
Fix some errors in README.md
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 31 May 2023 08:59:34 +0200 |
parents | 68dd0c9f5cac |
children | 654a2b7e6824 |
comparison
equal
deleted
inserted
replaced
1366:6bdb6fed6ed3 | 1378:2b5480e2d4bf |
---|---|
27 Pkg.test(test_args=["*/lazy_tensor_operations_test.jl", "Grids/*"]) | 27 Pkg.test(test_args=["*/lazy_tensor_operations_test.jl", "Grids/*"]) |
28 ``` | 28 ``` |
29 will run any file named `lazy_tensor_operations_test.jl` and all the files in the `Grids` folder. | 29 will run any file named `lazy_tensor_operations_test.jl` and all the files in the `Grids` folder. |
30 | 30 |
31 ## Running benchmarks | 31 ## Running benchmarks |
32 Benchmarks are defined in `benchmark/` and use the tools for benchmark suites in BenchmarkTools.jl. The format is compatible with PkgBenchmark.jl which helps with running the suite, comparing results and presenting the results in a readable way. There are custom functions included for running the benchmarks in this Mercurial repository. | 32 Benchmarks are defined in `benchmark/` and use the tools for benchmark suites |
33 in BenchmarkTools.jl. The format is compatible with PkgBenchmark.jl which | |
34 helps with running the suite, comparing results and presenting the results in | |
35 a readable way. There are custom functions included for running the benchmarks | |
36 in this Mercurial repository. | |
33 | 37 |
34 `benchmark/` contains a julia environment with the necessary packages for working with the benchmarks. | 38 `benchmark/` contains a julia environment with the necessary packages for |
39 working with the benchmarks. | |
35 | 40 |
36 To run the benchmarks, either use `make` run them manually from the REPL, as explained further below. | 41 To run the benchmarks, either use `make` or run them manually from the REPL, as |
42 explained further below. | |
37 | 43 |
38 Using `make` there are four targets for benchmarks | 44 Using `make` there are four targets for benchmarks |
39 ```shell | 45 ```shell |
40 make benchmark # Runs the suite for the current working directory | 46 make benchmark # Runs the suite for the current working directory |
41 make benchmarkrev REV=rev # Runs the suite at the specified revision | 47 make benchmarkrev REV=rev # Runs the suite at the specified revision |
42 make benchmarkcmp TARGET=target BASELINE=baseline # Compares two revisions | 48 make benchmarkcmp TARGET=target BASELINE=baseline # Compares two revisions |
43 make cleanbenchmark # Cleans up benchmark tunings and results | 49 make cleanbenchmark # Cleans up benchmark tunings and results |
44 ``` | 50 ``` |
45 Here `rev`, `target` and `baseline` are any valid Mercurial revision specifiers. Note that `make benchmarkrev` and `make benchmarkcmp` will fail if you have pending changes in your repository. | 51 Here `rev`, `target` and `baseline` are any valid Mercurial revision |
52 specifiers. | |
46 | 53 |
47 | 54 Alternatively, the benchmarks can be run from the REPL. To do this, first |
48 Alternatively, the benchmarks can be run from the REPL. To do this, first activate the environment in `benchmark/` then include the file `benchmark_utils.jl`. The suite can then be run using the function `main` in one of the following ways | 55 activate the environment in `benchmark/` then include the file |
56 `benchmark_utils.jl`. The suite can then be run using the function `main` in | |
57 one of the following ways | |
49 | 58 |
50 ```julia | 59 ```julia |
51 main() # Runs the suite for the current working directory | 60 main() # Runs the suite for the current working directory |
52 main(rev) # Runs the suite at the specified revision | 61 main(rev="...") # Runs the suite at the specified revision |
53 main(target, baseline) # Compares two revisions | 62 main(target="...", baseline="...") # Compares two revisions |
54 ``` | 63 ``` |
55 | 64 |
56 Again, `rev`, `target` and `baseline` are any valid Mercurial revision specifiers. Note that `main(rev)` and `main(target, baseline)` will fail if you have pending changes in your repository. | 65 Again, `rev`, `target` and `baseline` are any valid Mercurial revision |
66 specifiers. | |
57 | 67 |
58 PkgBenchmark can also be used directly. | 68 PkgBenchmark can also be used directly. |
59 | 69 |
60 ```julia | 70 ```julia |
61 using PkgBenchmark | 71 using PkgBenchmark |