Agnesoft Central Repository
Crates
agbench
// <crate>/benches/fs.rs, with `[[bench]] name = "fs" harness = false`
use Bench;
use ;
Run
cargo bench [-p <crate>] -- [--filter PATTERN]... [--filter-target PATTERN]... [--samples N] [--sample-ms MS] [--iters N] [--list] [--check]
Possible output:
benchmark target iters time overhead IQR
fs/read/64B std 8192 927.0 ns
agplatform 1.87 µs +100.4% [+67.6% .. +106.5%]
agplatform
read_file; // production implementation using std, tokio, reqwest
read_file; // test in-memory implementation with abilities to simulate failures, manipulate time etc.
agtestcheck
// source.rs
;
Run
# cargo install agtestcheck
cargo test-check [<dir|file.rs>]
Possible output:
source.rs:12: test `return_1` should be named `foo_should_<behaviour>` or `foo_<args>_should_<behaviour>`
source.rs:18: comment "testing stuff" should be deleted, start with WHY or GIVEN, WHEN, THEN, AND
source.rs:23: test `ranom_arbitrary_test` should be in the module of its type, trait, function or method