Skip to content

Add ripgrep-14.1.1 benchmark #2105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions collector/compile-benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ They mostly consist of real-world crates.
- **regex-1.5.5**: A regular expression parser. Used by many Rust programs.
- **ripgrep-13.0.0**: A line-oriented search tool. A widely-used utility, and a
binary crate.
- **ripgrep-14.1.1**: A line-oriented search tool. A widely-used utility, and a
binary crate.
- **serde-1.0.136**: A serialization/deserialization crate. Used by many other
Rust programs.
- **serde_derive-1.0.136**: A proc-macro sub-crate used by `serde`. Used by
Expand Down
5 changes: 5 additions & 0 deletions collector/compile-benchmarks/REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,11 @@ path = "ripgrep-13.0.0-tiny/**"
SPDX-FileCopyrightText = "ripgrep contributors"
SPDX-License-Identifier = "MIT OR Unlicense"

[[annotations]]
path = "ripgrep-14.1.1/**"
SPDX-FileCopyrightText = "ripgrep contributors"
SPDX-License-Identifier = "MIT OR Unlicense"

[[annotations]]
path = "serde-1.0.136/**"
SPDX-FileCopyrightText = "serde contributors"
Expand Down
21 changes: 21 additions & 0 deletions collector/compile-benchmarks/ripgrep-14.1.1/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# On Windows MSVC, statically link the C runtime so that the resulting EXE does
# not depend on the vcruntime DLL.
#
# See: https://github.com/BurntSushi/ripgrep/pull/1613
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

# Do the same for MUSL targets. At the time of writing (2023-10-23), this is
# the default. But the plan is for the default to change to dynamic linking.
# The whole point of MUSL with respect to ripgrep is to create a fully
# statically linked executable.
#
# See: https://github.com/rust-lang/compiler-team/issues/422
# See: https://github.com/rust-lang/compiler-team/issues/422#issuecomment-812135847
[target.x86_64-unknown-linux-musl]
rustflags = [
"-C", "target-feature=+crt-static",
"-C", "link-self-contained=yes",
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"git": {
"sha1": "4649aa9700619f94cf9c66876e9549d83420e16c"
},
"path_in_vcs": ""
}
22 changes: 22 additions & 0 deletions collector/compile-benchmarks/ripgrep-14.1.1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.*.swp
tags
target
/grep/Cargo.lock
/globset/Cargo.lock
/ignore/Cargo.lock
/termcolor/Cargo.lock
/wincolor/Cargo.lock
/deployment
/.idea

# Snapcraft files
stage
prime
parts
*.snap
*.pyc
ripgrep*_source.tar.bz2

# Cargo timings
cargo-timing-*.html
cargo-timing.html
1 change: 1 addition & 0 deletions collector/compile-benchmarks/ripgrep-14.1.1/.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!/.github/
12 changes: 12 additions & 0 deletions collector/compile-benchmarks/ripgrep-14.1.1/0-println.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/crates/core/search.rs b/crates/core/search.rs
index 67273425..4794ab49 100644
--- a/crates/core/search.rs
+++ b/crates/core/search.rs
@@ -340,6 +340,7 @@ impl<W: WriteColor> SearchWorker<W> {
fn search_path(&mut self, path: &Path) -> io::Result<SearchResult> {
use self::PatternMatcher::*;

+ println!("testing");
let (searcher, printer) = (&mut self.searcher, &mut self.printer);
match self.matcher {
RustRegex(ref m) => search_path(m, searcher, printer, path),
Loading
Loading