Skip to content

Commit

Permalink
dangling references to run-bench -> bench/run
Browse files Browse the repository at this point in the history
4fab6c1 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 b217bfe.
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.
  • Loading branch information
Ethan Pailes committed Oct 27, 2017
1 parent 72cee88 commit 57426f6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
16 changes: 8 additions & 8 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ N.B. To run tests for the `regex!` macro, use:

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

Expand All @@ -299,17 +299,17 @@ library benchmarks (especially RE2).
If you're hacking on one of the matching engines and just want to see
benchmarks, then all you need to run is:

$ ./run-bench rust
$ ./bench/run rust

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

$ ./run-bench rust | tee old
$ ./bench/run rust | tee old
$ ... make it faster
$ ./run-bench rust | tee new
$ cargo-benchcmp old new --improvements
$ ./bench/run rust | tee new
$ cargo benchcmp old new --improvements

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

The `run-bench` utility can run benchmarks for PCRE and Oniguruma too. See
`./run-bench --help`.
The `./bench/run` utility can run benchmarks for PCRE and Oniguruma too. See
`./bench/bench --help`.
3 changes: 1 addition & 2 deletions bench/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ bench = false
# Doing anything else will probably result in weird "duplicate definition"
# compiler errors.
#
# Tip: use the run-bench script in the root of this repository to run
# benchmarks.
# Tip: use the `bench/run` script (in this directory) to run benchmarks.
[features]
re-pcre1 = ["libpcre-sys"]
re-pcre2 = []
Expand Down

0 comments on commit 57426f6

Please sign in to comment.