Skip to content

Commit 99fd316

Browse files
Ethan PailesBurntSushi
Ethan Pailes
authored andcommitted
docs: fix dangling references to run-bench
4fab6c added the current bench runner script as `benches/run`, and removed the old `run-bench` script. It was later renamed to `bench/run` when `benches` was renamed to `bench` in b217bf. This patch fixes a few references to the old benchmark runner in the hacking guide as well as a few references to the old directory structure. The cargo plugin syntax in the example is also updated.
1 parent 75907d5 commit 99fd316

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

HACKING.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,9 @@ times slightly, try using `cargo test --test default`, which will only use the
264264

265265
The benchmarking in this crate is made up of many micro-benchmarks. Currently,
266266
there are two primary sets of benchmarks: the benchmarks that were adopted
267-
at this library's inception (in `benches/src/misc.rs`) and a newer set of
267+
at this library's inception (in `bench/src/misc.rs`) and a newer set of
268268
benchmarks meant to test various optimizations. Specifically, the latter set
269-
contain some analysis and are in `benches/src/sherlock.rs`. Also, the latter
269+
contain some analysis and are in `bench/src/sherlock.rs`. Also, the latter
270270
set are all executed on the same lengthy input whereas the former benchmarks
271271
are executed on strings of varying length.
272272

@@ -292,36 +292,36 @@ library benchmarks (especially RE2).
292292
If you're hacking on one of the matching engines and just want to see
293293
benchmarks, then all you need to run is:
294294

295-
$ ./run-bench rust
295+
$ ./bench/run rust
296296

297297
If you want to compare your results with older benchmarks, then try:
298298

299-
$ ./run-bench rust | tee old
299+
$ ./bench/run rust | tee old
300300
$ ... make it faster
301-
$ ./run-bench rust | tee new
302-
$ cargo-benchcmp old new --improvements
301+
$ ./bench/run rust | tee new
302+
$ cargo benchcmp old new --improvements
303303

304304
The `cargo-benchcmp` utility is available here:
305305
https://github.com/BurntSushi/cargo-benchcmp
306306

307-
The `run-bench` utility can run benchmarks for PCRE and Oniguruma too. See
308-
`./run-bench --help`.
307+
The `./bench/run` utility can run benchmarks for PCRE and Oniguruma too. See
308+
`./bench/bench --help`.
309309

310310
## Dev Docs
311311

312312
When digging your teeth into the codebase for the first time, the
313313
crate documentation can be a great resource. By default `rustdoc`
314314
will strip out all documentation of private crate members in an
315315
effort to help consumers of the crate focus on the *interface*
316-
without having to concern themselves with the *implimentation*.
316+
without having to concern themselves with the *implementation*.
317317
Normally this is a great thing, but if you want to start hacking
318318
on regex internals it is not what you want. Many of the private members
319319
of this crate are well documented with rustdoc style comments, and
320320
it would be a shame to miss out on the opportunity that presents.
321321
You can generate the private docs with:
322322

323323
```
324-
> rustdoc --crate-name docs src/lib.rs -o target/doc -L target/debug/deps --no-defaults --passes collapse-docs --passes unindent-comments
324+
$ rustdoc --crate-name docs src/lib.rs -o target/doc -L target/debug/deps --no-defaults --passes collapse-docs --passes unindent-comments
325325
```
326326

327327
Then just point your browser at `target/doc/regex/index.html`.

bench/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ bench = false
4141
# Doing anything else will probably result in weird "duplicate definition"
4242
# compiler errors.
4343
#
44-
# Tip: use the run script in this directory to run benchmarks.
44+
# Tip: use the `bench/run` script (in this directory) to run benchmarks.
4545
[features]
4646
re-pcre1 = ["libpcre-sys"]
4747
re-pcre2 = []

0 commit comments

Comments
 (0)