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 = []
2626[workspace ]
2727members = [
2828 " crates/compiler-builtins-smoke-test" ,
29+ " crates/libm-bench" ,
2930]
3031
3132[dev-dependencies ]
3233no-panic = " 0.1.8"
33- rand = " 0.6.5"
34- paste = " 0.1.5"
3534
3635[build-dependencies ]
3736rand = { 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).
3939
4040## Benchmark
4141[ benchmark ] : #benchmark
42- Run ` cargo +nightly bench `
4342
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
4547
4648## Contributing
4749
Original file line number Diff line number Diff line change 7777 vmImage : ubuntu-16.04
7878 steps :
7979 - template : ci/azure-install-rust.yml
80- - bash : cargo bench
80+ - bash : cargo bench --all
8181 displayName : " Benchmarks"
8282 variables :
8383 TOOLCHAIN : nightly
Original file line number Diff line number Diff line change 1- #! /bin/sh
1+ #! /usr/ bin/env sh
22
33set -ex
44TARGET=$1
55
6- cargo test --target $TARGET
7- cargo test --target $TARGET --release
6+ CMD=" cargo test --all --no-default-features --target $TARGET "
87
9- cargo test --features ' checked musl-reference-tests' --target $TARGET
8+ $CMD
9+ $CMD --release
1010
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 <gonzalobg88@gmail.com>" ]
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 11#![ feature( test) ]
2-
3- extern crate paste;
4- extern crate rand;
52extern crate test;
63
74use rand:: Rng ;
You can’t perform that action at this time.
0 commit comments