Skip to content

Commit ee1a3d6

Browse files
authored
Merge pull request #2105 from nnethercote/add-ripgrep
Add `ripgrep-14.1.1` benchmark
2 parents 0aee941 + ece2299 commit ee1a3d6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+26722
-0
lines changed

collector/compile-benchmarks/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ They mostly consist of real-world crates.
4646
- **regex-1.5.5**: A regular expression parser. Used by many Rust programs.
4747
- **ripgrep-13.0.0**: A line-oriented search tool. A widely-used utility, and a
4848
binary crate.
49+
- **ripgrep-14.1.1**: A line-oriented search tool. A widely-used utility, and a
50+
binary crate.
4951
- **serde-1.0.136**: A serialization/deserialization crate. Used by many other
5052
Rust programs.
5153
- **serde-1.0.219**: A serialization/deserialization crate. Used by many other

collector/compile-benchmarks/REUSE.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ path = "ripgrep-13.0.0-tiny/**"
210210
SPDX-FileCopyrightText = "ripgrep contributors"
211211
SPDX-License-Identifier = "MIT OR Unlicense"
212212

213+
[[annotations]]
214+
path = "ripgrep-14.1.1/**"
215+
SPDX-FileCopyrightText = "ripgrep contributors"
216+
SPDX-License-Identifier = "MIT OR Unlicense"
217+
213218
[[annotations]]
214219
path = "serde-1.0.136/**"
215220
SPDX-FileCopyrightText = "serde contributors"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
2+
# not depend on the vcruntime DLL.
3+
#
4+
# See: https://github.com/BurntSushi/ripgrep/pull/1613
5+
[target.x86_64-pc-windows-msvc]
6+
rustflags = ["-C", "target-feature=+crt-static"]
7+
[target.i686-pc-windows-msvc]
8+
rustflags = ["-C", "target-feature=+crt-static"]
9+
10+
# Do the same for MUSL targets. At the time of writing (2023-10-23), this is
11+
# the default. But the plan is for the default to change to dynamic linking.
12+
# The whole point of MUSL with respect to ripgrep is to create a fully
13+
# statically linked executable.
14+
#
15+
# See: https://github.com/rust-lang/compiler-team/issues/422
16+
# See: https://github.com/rust-lang/compiler-team/issues/422#issuecomment-812135847
17+
[target.x86_64-unknown-linux-musl]
18+
rustflags = [
19+
"-C", "target-feature=+crt-static",
20+
"-C", "link-self-contained=yes",
21+
]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"git": {
3+
"sha1": "4649aa9700619f94cf9c66876e9549d83420e16c"
4+
},
5+
"path_in_vcs": ""
6+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.*.swp
2+
tags
3+
target
4+
/grep/Cargo.lock
5+
/globset/Cargo.lock
6+
/ignore/Cargo.lock
7+
/termcolor/Cargo.lock
8+
/wincolor/Cargo.lock
9+
/deployment
10+
/.idea
11+
12+
# Snapcraft files
13+
stage
14+
prime
15+
parts
16+
*.snap
17+
*.pyc
18+
ripgrep*_source.tar.bz2
19+
20+
# Cargo timings
21+
cargo-timing-*.html
22+
cargo-timing.html
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!/.github/
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/crates/core/search.rs b/crates/core/search.rs
2+
index 67273425..4794ab49 100644
3+
--- a/crates/core/search.rs
4+
+++ b/crates/core/search.rs
5+
@@ -340,6 +340,7 @@ impl<W: WriteColor> SearchWorker<W> {
6+
fn search_path(&mut self, path: &Path) -> io::Result<SearchResult> {
7+
use self::PatternMatcher::*;
8+
9+
+ println!("testing");
10+
let (searcher, printer) = (&mut self.searcher, &mut self.printer);
11+
match self.matcher {
12+
RustRegex(ref m) => search_path(m, searcher, printer, path),

0 commit comments

Comments
 (0)