Skip to content

Commit 4142e42

Browse files
committed
Add benchmark files and update documentation
1 parent 83c8845 commit 4142e42

File tree

6 files changed

+52
-23
lines changed

6 files changed

+52
-23
lines changed

collector/compile-benchmarks/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ They mostly consist of real-world crates.
2727
- **cranelift-codegen-0.119.0**: The largest crate from a code generator. Used by wasmtime. Stresses obligation processing.
2828
- **diesel-1.4.8**: A type-safe SQL query builder. Utilizes the type system to ensure a lot of invariants. Stresses anything related to resolving trait bounds, by having a lot of trait impls for a large number of different types.
2929
- **diesel-2.2:10**: A type-safe SQL query builder. Utilizes the type system to ensure a lot of invariants. Stresses anything related to resolving trait bounds, by having a lot of trait impls for a large number of different types.
30-
- **exa-0.10.1**: An `ls` replacement. A widely-used utility, and a binary
31-
crate.
30+
- **exa-0.10.1**: An `ls` replacement. A widely-used utility, and a binary crate.
31+
- **eza-0.21.2**: An `ls` replacement. A widely-used utility, and a binary crate. Fork of `exa`.
3232
- **helloworld**: A trivial program. Gives a lower bound on compile time.
3333
- **html5ever-0.31.0**: An HTML parser. Stresses macro parsing code.
3434
- **hyper-0.14.18**: A fairly large crate. Utilizes async/await, and used by

collector/compile-benchmarks/REUSE.toml

+5
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ path = "exa-0.10.1/**"
9292
SPDX-FileCopyrightText = "exa contributors"
9393
SPDX-License-Identifier = "MIT"
9494

95+
[[annotations]]
96+
path = "eza-0.21.2/**"
97+
SPDX-FileCopyrightText = "Christina Sørensen, eza contributors"
98+
SPDX-License-Identifier = "EUPL-1.2"
99+
95100
[[annotations]]
96101
path = "externs/**"
97102
SPDX-FileCopyrightText = "The Rust Project Developers (see https://thanks.rust-lang.org)"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
diff --git a/src/fs/file.rs b/src/fs/file.rs
2+
index 864ea074..87cccbcb 100644
3+
--- a/src/fs/file.rs
4+
+++ b/src/fs/file.rs
5+
@@ -131,6 +131,7 @@ impl<'dir> File<'dir> {
6+
PD: Into<Option<&'dir Dir>>,
7+
FN: Into<Option<String>>,
8+
{
9+
+ println!("testing 3");
10+
let parent_dir = parent_dir.into();
11+
let name = filename.into().unwrap_or_else(|| File::filename(&path));
12+
let ext = File::ext(&path);
13+
diff --git a/src/logger.rs b/src/logger.rs
14+
index 351890ef..517eee09 100644
15+
--- a/src/logger.rs
16+
+++ b/src/logger.rs
17+
@@ -39,6 +39,7 @@ const GLOBAL_LOGGER: &Logger = &Logger;
18+
19+
impl log::Log for Logger {
20+
fn enabled(&self, _: &log::Metadata<'_>) -> bool {
21+
+ println!("testing 1");
22+
true // no need to filter after using ‘set_max_level’.
23+
}
24+
25+
diff --git a/src/theme/ui_styles.rs b/src/theme/ui_styles.rs
26+
index 5f2b047a..33f1c422 100644
27+
--- a/src/theme/ui_styles.rs
28+
+++ b/src/theme/ui_styles.rs
29+
@@ -508,6 +508,7 @@ impl UiStyles {
30+
/// by the `LS_COLORS` environment variable. Invalid keys set nothing, but
31+
/// return false.
32+
pub fn set_ls(&mut self, pair: &Pair<'_>) -> bool {
33+
+ println!("testing 2");
34+
#[rustfmt::skip]
35+
match pair.key {
36+
"di" => self.filekinds().directory = Some(pair.to_style()), // DIR

collector/compile-benchmarks/eza-0.21.2/Cargo.toml

+5-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ codegen-units = 1
101101
panic = "abort"
102102
strip = true
103103

104-
[lib]
105-
name = "eza"
106-
path = "src/lib.rs"
104+
#[lib]
105+
#name = "eza"
106+
#path = "src/lib.rs"
107107

108108
[[bin]]
109109
name = "eza"
@@ -237,3 +237,5 @@ features = [
237237

238238
[target."cfg(unix)".dependencies.uzers]
239239
version = "0.12.1"
240+
241+
[workspace]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"artifact": "binary",
3+
"category": "primary"
4+
}

collector/compile-benchmarks/eza-0.21.2/src/lib.rs

-18
This file was deleted.

0 commit comments

Comments
 (0)