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

Move benchmarks to a separate crate #1243

Merged
merged 1 commit into from Sep 3, 2023

Conversation

pitdicker
Copy link
Collaborator

@pitdicker pitdicker commented Sep 1, 2023

As reported in #1223 a security advisory for atty shows up when we resolve the one for time 0.1.

By moving the benchmarks to a separate crate criterion and its dependencies no longer affect our MSRV or can cause advisories, and criterion can be updated to 5.1.

I needed a lib.rs file to have a valid crate, and we had a tiny one in ci/core-test. It seemed like a nice opportunity to merge them. Edit: doesn't work.

Fixes #1223, alternative to #1224.

@codecov
Copy link

codecov bot commented Sep 1, 2023

Codecov Report

Merging #1243 (616cd49) into 0.4.x (ecfad9e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            0.4.x    #1243   +/-   ##
=======================================
  Coverage   85.82%   85.82%           
=======================================
  Files          37       37           
  Lines       13517    13517           
=======================================
  Hits        11601    11601           
  Misses       1916     1916           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pitdicker pitdicker force-pushed the criterion_crate branch 2 times, most recently from 459ab7e to c71f9ba Compare September 1, 2023 16:41
@pitdicker pitdicker marked this pull request as ready for review September 1, 2023 16:49
@djc
Copy link
Contributor

djc commented Sep 1, 2023

I think we should move criterion to be a dev-dependency instead and make it a proper benchmark within the main crate. Then we can restrict our MSRV test to only check cargo check --lib --features foo,bar to avoid making dev-dependencies part of our MSRV tests.

@pitdicker
Copy link
Collaborator Author

I gave that another try this morning, but it doesn't seem to work: #1245

Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

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

Okay, let's do it. Can you rename the top-level crate to bench so it's slightly less confusing to have benches/benches?

version = "0.1.0"
edition = "2021"

# Even as a `dev-dependency` Criterion and its dependencies can affect the MSRV of chrono.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a really informative comment. 👍

@pitdicker pitdicker force-pushed the criterion_crate branch 2 times, most recently from e82177f to 1d80bf4 Compare September 3, 2023 04:49
@pitdicker pitdicker merged commit e39346e into chronotope:0.4.x Sep 3, 2023
37 checks passed
@pitdicker pitdicker deleted the criterion_crate branch September 3, 2023 05:08
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.

None yet

3 participants