Skip to content

Commit

Permalink
Document that bench is unstable in the man page.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss committed May 8, 2020
1 parent b8e5255 commit ee648ea
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
10 changes: 10 additions & 0 deletions src/doc/man/cargo-bench.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ The libtest harness may be disabled by setting `harness = false` in the target
manifest settings, in which case your code will need to provide its own `main`
function to handle running benchmarks.


> **Note**: The
> link:https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html[`#[bench\]` attribute]
> is currently unstable and only available on the
> link:https://doc.rust-lang.org/book/appendix-07-nightly-rust.html[nightly channel].
> There are some packages available on
> link:https://crates.io/keywords/benchmark[crates.io] that may help with
> running benchmarks on the stable channel, such as
> link:https://crates.io/crates/criterion[Criterion].

== OPTIONS

=== Benchmark Options
Expand Down
14 changes: 14 additions & 0 deletions src/doc/man/generated/cargo-bench.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ <h2 id="cargo_bench_description">DESCRIPTION</h2>
manifest settings, in which case your code will need to provide its own <code>main</code>
function to handle running benchmarks.</p>
</div>
<div class="quoteblock">
<blockquote>
<div class="paragraph">
<p><strong>Note</strong>: The
<a href="https://doc.rust-lang.org/nightly/unstable-book/library-features/test.html"><code>#[bench]</code> attribute</a>
is currently unstable and only available on the
<a href="https://doc.rust-lang.org/book/appendix-07-nightly-rust.html">nightly channel</a>.
There are some packages available on
<a href="https://crates.io/keywords/benchmark">crates.io</a> that may help with
running benchmarks on the stable channel, such as
<a href="https://crates.io/crates/criterion">Criterion</a>.</p>
</div>
</blockquote>
</div>
</div>
</div>
<div class="sect1">
Expand Down
20 changes: 18 additions & 2 deletions src/etc/man/cargo-bench.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: cargo-bench
.\" Author: [see the "AUTHOR(S)" section]
.\" Generator: Asciidoctor 2.0.10
.\" Date: 2020-02-06
.\" Date: 2020-05-08
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "CARGO\-BENCH" "1" "2020-02-06" "\ \&" "\ \&"
.TH "CARGO\-BENCH" "1" "2020-05-08" "\ \&" "\ \&"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
Expand Down Expand Up @@ -59,6 +59,22 @@ the test harness to tell it to run only benchmarks.
The libtest harness may be disabled by setting \fBharness = false\fP in the target
manifest settings, in which case your code will need to provide its own \fBmain\fP
function to handle running benchmarks.
.RS 3
.ll -.6i
.sp
\fBNote\fP: The
\c
.URL "https://doc.rust\-lang.org/nightly/unstable\-book/library\-features/test.html" "\fB#[bench]\fP attribute"
is currently unstable and only available on the
.URL "https://doc.rust\-lang.org/book/appendix\-07\-nightly\-rust.html" "nightly channel" "."
There are some packages available on
.URL "https://crates.io/keywords/benchmark" "crates.io" " "
that may help with
running benchmarks on the stable channel, such as
.URL "https://crates.io/crates/criterion" "Criterion" "."
.br
.RE
.ll
.SH "OPTIONS"
.SS "Benchmark Options"
.sp
Expand Down

0 comments on commit ee648ea

Please sign in to comment.