Skip to content

perf: Add criterion benchmark for aggregate expressions#948

Merged
andygrove merged 6 commits intoapache:mainfrom
andygrove:agg-bench
Sep 18, 2024
Merged

perf: Add criterion benchmark for aggregate expressions#948
andygrove merged 6 commits intoapache:mainfrom
andygrove:agg-bench

Conversation

@andygrove
Copy link
Copy Markdown
Member

@andygrove andygrove commented Sep 18, 2024

Which issue does this PR close?

N/A

Rationale for this change

Add Criterion benchmark to compare DataFusion and Comet aggregate expressions.

aggregate/avg_decimal_datafusion
                        time:   [653.56 µs 657.57 µs 662.06 µs]
aggregate/avg_decimal_comet
                        time:   [1.0581 ms 1.0592 ms 1.0604 ms]
aggregate/sum_decimal_datafusion
                        time:   [695.51 µs 696.48 µs 697.60 µs]
aggregate/sum_decimal_comet
                        time:   [1.0218 ms 1.0230 ms 1.0242 ms]

What changes are included in this PR?

New benchmark

How are these changes tested?

Manually

@andygrove andygrove changed the title perf: Add criterion benchmark for SumDecimal aggregation perf: Add criterion benchmark for aggregation expressions Sep 18, 2024
@andygrove andygrove changed the title perf: Add criterion benchmark for aggregation expressions perf: Add criterion benchmark for aggregate expressions Sep 18, 2024
Comment thread native/core/Cargo.toml Outdated

[[bench]]
name = "aggregate"
harness = false No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: shall we add an empty line to the end of the file?

Copy link
Copy Markdown
Contributor

@huaxingao huaxingao left a comment

Choose a reason for hiding this comment

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

LGTM

});

group.bench_function("sum_decimal_comet", |b| {
let comet_sum_decimal = Arc::new(AggregateUDF::new_from_impl(SumDecimal::new(
Copy link
Copy Markdown
Contributor

@kazuyukitanimura kazuyukitanimura Sep 18, 2024

Choose a reason for hiding this comment

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

do we need to use blackbox to avoid the optimization?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

added, thanks

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.02%. Comparing base (4032129) to head (13312aa).
Report is 399 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #948      +/-   ##
============================================
- Coverage     34.15%   34.02%   -0.13%     
+ Complexity      881      876       -5     
============================================
  Files           112      112              
  Lines         43276    43276              
  Branches       9572     9572              
============================================
- Hits          14779    14725      -54     
- Misses        25478    25518      +40     
- Partials       3019     3033      +14     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@andygrove andygrove merged commit d5116a1 into apache:main Sep 18, 2024
@andygrove andygrove deleted the agg-bench branch September 18, 2024 22:02
coderfender pushed a commit to coderfender/datafusion-comet that referenced this pull request Dec 13, 2025
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.

5 participants