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

Remove criterion-cycles-per-byte dependency and related benchmark measurement #995

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

orf
Copy link
Contributor

@orf orf commented Aug 25, 2023

Summary

criterion-cycles-per-byte is not supported on non-x86_64 platforms, so cargo test cannot be run:

❯ cargo test
   Compiling libcst v0.1.0 (x)
   Compiling criterion-cycles-per-byte v0.1.2
error: criterion-cycles-per-byte currently relies on x86 or x86_64.
  --> /Users/tom/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/criterion-cycles-per-byte-0.1.2/src/lib.rs:34:1
   |
34 | compile_error!("criterion-cycles-per-byte currently relies on x86 or x86_64.");
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This PR makes it conditional and allows the tests to run.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 25, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 26, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (e9bad94) 90.93% compared to head (4cb9629) 90.93%.
Report is 1 commits behind head on main.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #995   +/-   ##
=======================================
  Coverage   90.93%   90.93%           
=======================================
  Files         254      254           
  Lines       25972    25972           
=======================================
  Hits        23617    23617           
  Misses       2355     2355           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@zsol zsol left a comment

Choose a reason for hiding this comment

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

Would you mind adding a CI step in this PR to make sure the benchmark at least compiles?

native/libcst/benches/parser_benchmark.rs Outdated Show resolved Hide resolved
@orf
Copy link
Contributor Author

orf commented Aug 26, 2023

Thanks @zsol, I've added a CI step to build the benchmark suite without running it.

@orf
Copy link
Contributor Author

orf commented Aug 26, 2023

I'm afraid I don't have access to a x86_64 machine to really test this and I can't even check the compilation with criterion_cycles_per_byte added, so I'm kind of debugging via CI.

@zsol if this last build doesn't work, could we merge this without criterion_cycles_per_byte and add it back in later?

@zsol
Copy link
Member

zsol commented Aug 26, 2023

Yeah, I'm fine with removing cycles/byte actually; it was never accurate enough to be reliable in CI.

@orf
Copy link
Contributor Author

orf commented Aug 26, 2023

Done! Thanks

@zsol zsol changed the title Fix criterion-cycles-per-byte compilation error on non-x86_64 platforms. Remove criterion-cycles-per-byte dependency and related benchmark measurement Aug 26, 2023
@zsol zsol merged commit b28777e into Instagram:main Aug 26, 2023
17 of 21 checks passed
@zsol
Copy link
Member

zsol commented Aug 26, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants