This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +30
-13
lines changed Expand file tree Collapse file tree 6 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,11 @@ checked = []
26
26
[workspace ]
27
27
members = [
28
28
" crates/compiler-builtins-smoke-test" ,
29
+ " crates/libm-bench" ,
29
30
]
30
31
31
32
[dev-dependencies ]
32
33
no-panic = " 0.1.8"
33
- rand = " 0.6.5"
34
- paste = " 0.1.5"
35
34
36
35
[build-dependencies ]
37
36
rand = { version = " 0.6.5" , optional = true }
Original file line number Diff line number Diff line change @@ -39,9 +39,11 @@ The API documentation can be found [here](https://docs.rs/libm).
39
39
40
40
## Benchmark
41
41
[ benchmark ] : #benchmark
42
- Run ` cargo +nightly bench `
43
42
44
- NOTE: remember to have nightly installed ` rustup install nightly `
43
+ The benchmarks are located in ` crates/libm-bench ` and require a nightly Rust toolchain.
44
+ To run all benchmarks:
45
+
46
+ > cargo +nightly bench --all
45
47
46
48
## Contributing
47
49
Original file line number Diff line number Diff line change 77
77
vmImage : ubuntu-16.04
78
78
steps :
79
79
- template : ci/azure-install-rust.yml
80
- - bash : cargo bench
80
+ - bash : cargo bench --all
81
81
displayName : " Benchmarks"
82
82
variables :
83
83
TOOLCHAIN : nightly
Original file line number Diff line number Diff line change 1
- #! /bin/sh
1
+ #! /usr/ bin/env sh
2
2
3
3
set -ex
4
4
TARGET=$1
5
5
6
- cargo test --target $TARGET
7
- cargo test --target $TARGET --release
6
+ CMD=" cargo test --all --no-default-features --target $TARGET "
8
7
9
- cargo test --features ' checked musl-reference-tests' --target $TARGET
8
+ $CMD
9
+ $CMD --release
10
10
11
- cargo test --features ' checked musl-reference-tests' --target $TARGET --release
11
+ $CMD --features ' stable'
12
+ $CMD --release --features ' stable'
13
+
14
+ $CMD --features ' stable checked musl-reference-tests'
15
+ $CMD --release --features ' stable checked musl-reference-tests'
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " libm-bench"
3
+ version = " 0.1.0"
4
+ authors = [
" Gonzalo Brito Gadeschi <[email protected] >" ]
5
+ edition = " 2018"
6
+ license = " MIT OR Apache-2.0"
7
+
8
+ [dependencies ]
9
+ libm = { path = " ../.." , default-features = false }
10
+ rand = " 0.6.5"
11
+ paste = " 0.1.5"
12
+
13
+ [features ]
14
+ default = []
15
+ stable = [ " libm/stable" ]
Original file line number Diff line number Diff line change 1
1
#![ feature( test) ]
2
-
3
- extern crate paste;
4
- extern crate rand;
5
2
extern crate test;
6
3
7
4
use rand:: Rng ;
You can’t perform that action at this time.
0 commit comments