Skip to content

Commit b42fa75

Browse files
committed
Add benchmark files and update documentation
1 parent 7f8fd76 commit b42fa75

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-2
lines changed

collector/compile-benchmarks/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ They mostly consist of real-world crates.
3232
crate.
3333
- **helloworld**: A trivial program. Gives a lower bound on compile time.
3434
- **html5ever-0.26.0**: An HTML parser. Stresses macro parsing code.
35+
- **html5ever-0.31.0**: An HTML parser. Stresses macro parsing code.
3536
- **hyper-0.14.18**: A fairly large crate. Utilizes async/await, and used by
3637
many Rust programs. The crate uses cargo features to enable large portions of its
3738
structure and is built with `--features=client,http1,http2,server,stream`.

collector/compile-benchmarks/REUSE.toml

+5
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ path = "html5ever-0.26.0/**"
110110
SPDX-FileCopyrightText = "The html5ever Project Developers"
111111
SPDX-License-Identifier = "MIT OR Apache-2.0"
112112

113+
[[annotations]]
114+
path = "html5ever-0.31.0/**"
115+
SPDX-FileCopyrightText = "The html5ever Project Developers"
116+
SPDX-License-Identifier = "MIT OR Apache-2.0"
117+
113118
[[annotations]]
114119
path = "hyper-0.14.18/**"
115120
SPDX-FileCopyrightText = "hyper contributors"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/src/util/str.rs b/src/util/str.rs
2+
index 2c0ec3e2..a78ff669 100644
3+
--- a/src/util/str.rs
4+
+++ b/src/util/str.rs
5+
@@ -10,6 +10,7 @@
6+
use std::fmt;
7+
8+
pub(crate) fn to_escaped_string<T: fmt::Debug>(x: &T) -> String {
9+
+ println!("testing");
10+
// FIXME: don't allocate twice
11+
let string = format!("{x:?}");
12+
string.chars().flat_map(|c| c.escape_default()).collect()

collector/compile-benchmarks/html5ever-0.31.0/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,5 @@ version = "2.0.2"
8686

8787
[features]
8888
trace_tokenizer = []
89+
90+
[workspace]
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2-
"artifact": "library",
3-
"category": "primary"
2+
"touch_file": "src/lib.rs",
3+
"category": "primary",
4+
"artifact": "library"
45
}

0 commit comments

Comments
 (0)