All our testing is cargo
based and a simple
$ cargo test
runs the vast majority of tests. Tests require sudo
to be set up properly, as
some of the functionality we rely on is privileged. Test artifacts are
transparently created as long as the generate-unit-test-files
feature is
active, which is enabled by default for testing.
We use a mixture of Criterion end-to-end benchmarks and libtest
based unit-test style ones.
To run the full benchmark suite, use:
$ cargo bench --features=nightly --features=generate-large-test-files
For all Criterion powered benchmarks, a run will automatically establish a new base line. You can check out a different change, re-run the above command, and it will print the performance difference.
To get a CPU profile in the form of a flamegraph, you can use
cargo-flamegraph
(can be installed via cargo install flamegraph
). The following command will create a profile for the
bench_function_parsing_blazesym
benchmark, for example:
$ cargo flamegraph --package=blazesym --unit-bench --root --features=nightly -- bench_function_parsing_blazesym
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。