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

Bench overview #325

Merged
merged 1 commit into from
Oct 10, 2020
Merged

Bench overview #325

merged 1 commit into from
Oct 10, 2020

Conversation

zbraniecki
Copy link
Member

This PR is on top of #323 and it fixes #324.

The goal is to separate benchmarks that are overview and have them available by default as cargo bench both in each component/util and from the main directory.

All other benchmarks are behind flag bench.

I also updated a couple benchmark names adding top level crate name to make it easier to recognize that parser/overview is part of plurals (so, renamed to plurals/parser/overview).

The choice of what's in overview is a bit arbitrary and I expect us to continue refining them, but much like examples I'd like the overview benchmarks to be a decent approximation of what we expect common users to use.

@zbraniecki zbraniecki requested review from nciric, sffc and a team as code owners October 10, 2020 21:39
@zbraniecki zbraniecki added this to the ICU4X 0.1 milestone Oct 10, 2020
echeran
echeran previously approved these changes Oct 10, 2020
Copy link
Contributor

@echeran echeran left a comment

Choose a reason for hiding this comment

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

Things look good, I approve. I had one nit about a typo, and I left, some optional minor comments about var naming.

optional PR-level comment: Maybe update the wiki to better reflect the verbiage in the PR description. The PR description mentions overview and detailed (<- with the inline code formatting), making me think that those are terms. The wiki doesn't actually formally define those terms, though, even though there are descriptions of "overview" and "detailed benchmarks".

@@ -1,3 +1,24 @@
#[macro_export]
macro_rules! overview {
($c:expr, $struct:ident, $data_str:expr, $compare:expr) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

optional: the first argument to the macro is a Criterion benchmark group (according to what I see in the next file), so $c seems cryptic.

Copy link
Member Author

Choose a reason for hiding this comment

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

in criterion we often use c to refer to either the group or the testsuite, all other macros use $c - I'll leave the rename to a PR for all macros at the same time.

// This benchmark focuses on short numbers and performs:
// * Construction of FixedDecimals from isize
// * Construction of FixedDecimals from strings
// * Serialization of FixedDEcimal to string
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: FixedDEcimal -> FixedDecimal

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • Cargo.toml is no longer changed in the branch
  • CODEOWNERS is no longer changed in the branch
  • components/cldr-json-data-provider/Cargo.toml is no longer changed in the branch
  • components/cldr-json-data-provider/src/transform/plurals.rs is no longer changed in the branch
  • components/icu/Cargo.toml is no longer changed in the branch
  • components/icu/src/lib.rs is no longer changed in the branch
  • components/plurals/benches/fixtures/mod.rs is no longer changed in the branch
  • components/plurals/benches/fixtures/numbers.json is no longer changed in the branch
  • components/plurals/benches/fixtures/plurals.json is no longer changed in the branch
  • components/plurals/benches/helpers/mod.rs is no longer changed in the branch
  • components/plurals/Cargo.toml is no longer changed in the branch
  • components/plurals/examples/elevator_floors.rs is no longer changed in the branch
  • components/plurals/examples/unread_emails.rs is no longer changed in the branch
  • components/plurals/src/data.rs is no longer changed in the branch
  • components/plurals/src/error.rs is no longer changed in the branch
  • components/plurals/src/lib.rs is no longer changed in the branch
  • components/plurals/src/operands.rs is no longer changed in the branch
  • components/plurals/src/rules/ast.rs is no longer changed in the branch
  • components/plurals/src/rules/lexer.rs is no longer changed in the branch
  • components/plurals/src/rules/mod.rs is no longer changed in the branch
  • components/plurals/src/rules/parser.rs is no longer changed in the branch
  • components/plurals/src/rules/resolver.rs is no longer changed in the branch
  • components/plurals/src/rules/serializer.rs is no longer changed in the branch
  • components/plurals/tests/fixtures/mod.rs is no longer changed in the branch
  • components/plurals/tests/fixtures/operands.json is no longer changed in the branch
  • components/plurals/tests/fixtures/rules.json is no longer changed in the branch
  • components/plurals/tests/helpers.rs is no longer changed in the branch
  • components/plurals/tests/operands.rs is no longer changed in the branch
  • components/plurals/tests/plurals.rs is no longer changed in the branch
  • components/plurals/tests/rules.rs is no longer changed in the branch
  • components/uniset/examples/unicode_bmp_blocks_selector.rs is no longer changed in the branch
  • components/uniset/src/builder.rs is no longer changed in the branch
  • components/uniset/src/lib.rs is no longer changed in the branch
  • components/uniset/src/uniset.rs is no longer changed in the branch
  • docs/style-guide.md is no longer changed in the branch

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • utils/fixed-decimal/benches/fixed_decimal.rs is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@zbraniecki zbraniecki merged commit e9739af into unicode-org:master Oct 10, 2020
@echeran
Copy link
Contributor

echeran commented Oct 11, 2020

@zbraniecki I don't remember how the CI checks were when I reviewed (so I may have overlooked things), but currently the benchmark commands have errors during the CI steps for creating the benchmark dashboards. Thankfully, the existing dashboards and API docs are unaffected.

@zbraniecki zbraniecki deleted the bench-overview branch October 19, 2020 15:49
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.

Unify benchmark names
2 participants