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

feat/36/add benchmarks #70

Merged
merged 13 commits into from
Jun 18, 2024

Conversation

cernicc
Copy link
Member

@cernicc cernicc commented Jun 11, 2024

Description

Added benchmarks for mater create.

Important points for reviewers

Used: https://docs.rs/criterion/latest/criterion/

Checklist

  • Are there important points that reviewers should know?
    • If yes, which ones?
  • Make sure that you described what this change does.
  • If there are follow-ups, have you created issues for them?
    • If yes, which ones? / List them here
  • Have you tested this solution?
  • Were there any alternative implementations considered?
  • Did you document new (or modified) APIs?

@cernicc cernicc linked an issue Jun 11, 2024 that may be closed by this pull request
@cernicc cernicc added the ready for review Review is needed label Jun 11, 2024
@cernicc cernicc added ready for review Review is needed and removed ready for review Review is needed labels Jun 11, 2024
@cernicc cernicc added ready for review Review is needed and removed ready for review Review is needed labels Jun 11, 2024
@cernicc cernicc requested a review from jmg-duarte June 12, 2024 08:05
@cernicc cernicc marked this pull request as ready for review June 12, 2024 08:43
th7nder
th7nder previously approved these changes Jun 12, 2024
Copy link
Contributor

@th7nder th7nder left a comment

Choose a reason for hiding this comment

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

benchmark setup looks great! got a question though, what do we do with it and when do we run it, should it be on the pipeline? what's the process?

@cernicc
Copy link
Member Author

cernicc commented Jun 12, 2024

benchmark setup looks great! got a question though, what do we do with it and when do we run it, should it be on the pipeline? what's the process?

Good question. I am not sure. @serg-temchenko what is usually the process?

storage/mater/Cargo.toml Outdated Show resolved Hide resolved
storage/mater/benches/benchmark.rs Show resolved Hide resolved
@serg-temchenko
Copy link
Contributor

serg-temchenko commented Jun 13, 2024

benchmark setup looks great! got a question though, what do we do with it and when do we run it, should it be on the pipeline? what's the process?

Good question. I am not sure. @serg-temchenko what is usually the process?

Considering that our proposal didn't contain a lot of information about this, I was thinking that the purpose is to run benchmarks with several types of files, such as small, medium, and large files. We should run each case multiple times, gather performance output, and include it in the documentation/README file of the crate.

Is it possible to do with this setup?

@cernicc cernicc added ready for review Review is needed and removed ready for review Review is needed labels Jun 13, 2024
@cernicc cernicc requested review from jmg-duarte and th7nder June 13, 2024 13:33
storage/mater/benches/benchmark.rs Outdated Show resolved Hide resolved
storage/mater/benches/benchmark.rs Outdated Show resolved Hide resolved
storage/mater/benches/benchmark.rs Outdated Show resolved Hide resolved
@cernicc cernicc requested a review from jmg-duarte June 14, 2024 14:53
th7nder
th7nder previously approved these changes Jun 14, 2024
Copy link
Contributor

@th7nder th7nder left a comment

Choose a reason for hiding this comment

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

looks solid! let's generate those benchmarks and add them to the docs.

Copy link
Contributor

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

If I try to run the benchmarks using cargo bench all tests are ignored. Tried a bunch of flags and nothing.

Please document how to run the benchmarks in the crate's README (and take the opportunity to make the specs list, an actual list, I f'd up when I wrote it 😅).

Do also run the benchmarks and document your findings in your PC — maybe @th7nder could also run them on his 24-core machine? 👀

@cernicc
Copy link
Member Author

cernicc commented Jun 18, 2024

If I try to run the benchmarks using cargo bench all tests are ignored. Tried a bunch of flags and nothing.

cargo bench is correct. You have to wait for a few seconds at the beginning because the files are being generated. On my machine it takes ~5s for them to be generated before running the first benchmark

Please document how to run the benchmarks in the crate's README (and take the opportunity to make the specs list, an actual list, I f'd up when I wrote it 😅).

The spec list for the storage provider? Uff :D

@jmg-duarte
Copy link
Contributor

cargo bench is correct. You have to wait for a few seconds at the beginning because the files are being generated. On my machine it takes ~5s for them to be generated before running the first benchmark

I'd wait, but the tests are ignored, what gives?

The spec list for the storage provider? Uff :D

I meant this:

-CARv1 specification: https://ipld.io/specs/transport/car/carv1/
-CARv2 specification: https://ipld.io/specs/transport/car/carv2/
-UnixFS specification: https://github.com/ipfs/specs/blob/e4e5754ad4a4bfbb2ebe63f4c27631f573703de0/UNIXFS.md
+* CARv1 specification: https://ipld.io/specs/transport/car/carv1/
+* CARv2 specification: https://ipld.io/specs/transport/car/carv2/
+* UnixFS specification: https://github.com/ipfs/specs/blob/e4e5754ad4a4bfbb2ebe63f4c27631f573703de0/UNIXFS.md

@cernicc cernicc self-assigned this Jun 18, 2024
@cernicc cernicc added ready for review Review is needed and removed ready for review Review is needed labels Jun 18, 2024
@cernicc cernicc requested review from jmg-duarte and th7nder June 18, 2024 11:44
@cernicc cernicc added ready for review Review is needed and removed ready for review Review is needed labels Jun 18, 2024
storage/mater/BENCHMARK.md Outdated Show resolved Hide resolved
@cernicc cernicc added ready for review Review is needed and removed ready for review Review is needed labels Jun 18, 2024
Copy link
Contributor

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

Looks good to me. From looking at the benchmarks I'm fairly sure that the filestore has a bug — i.e. doesn't de-duplicate blocks

@serg-temchenko serg-temchenko added ready for review Review is needed and removed ready for review Review is needed labels Jun 18, 2024
@serg-temchenko serg-temchenko enabled auto-merge June 18, 2024 16:45
@serg-temchenko serg-temchenko merged commit d5afa03 into develop Jun 18, 2024
3 checks passed
@serg-temchenko serg-temchenko deleted the feat/63/benchmarks-for-the-mater-library branch June 18, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Review is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

benchmarks for the mater library
4 participants