Skip to content
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

Add a basic benchmark tool to xtask #471

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

nicholasbishop
Copy link
Owner

For example, after running cargo xtask download-big-filesystems:

$ cargo xtask bench test_data/chromiumos_root.bin
iter 1:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.52s
iter 2:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.37s
iter 3:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.38s
iter 4:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.36s
iter 5:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.36s
range: 1.36s - 1.52s
median: 1.37s

) -> Result<(), Ext4Error> {
let entry_iter = match fs.read_dir(path) {
Ok(entry_iter) => entry_iter,
Err(Ext4Error::Encrypted) => return Ok(()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: feels like there should be some kinda warning here, but I'm not sure it's worth adding.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@nicholasbishop nicholasbishop force-pushed the bishop-bench-basic branch 2 times, most recently from 92de9ac to 51d535e Compare March 25, 2025 01:16
For example, after running `cargo xtask download-big-filesystems`:

```
$ cargo xtask bench test_data/chromiumos_root.bin
iter 1:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.52s
iter 2:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.37s
iter 3:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.38s
iter 4:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.36s
iter 5:
filesystem hash: de095c100670bb05b5cd0d48449743c42a374e1284c3ea4928a4000d79e6a1ba
1.36s
range: 1.36s - 1.52s
median: 1.37s
```
@nicholasbishop nicholasbishop enabled auto-merge (rebase) March 25, 2025 01:18
@nicholasbishop nicholasbishop merged commit 2ff8d0b into main Mar 25, 2025
12 checks passed
@nicholasbishop nicholasbishop deleted the bishop-bench-basic branch March 25, 2025 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants