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

perf: add metrics to CopyExec and ScanExec #778

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Aug 4, 2024

Which issue does this PR close?

N/A

Rationale for this change

Add more metrics so that we can more easily see the overhead of each operator.

Example output:

ProjectionExec: ..., metrics=[elapsed_compute{partition=0}=3.467µs, output_rows{partition=0}=100]
  SortExec: ..., metrics=[elapsed_compute{partition=0}=128.029µs, output_rows{partition=0}=100, ...
    CopyExec, metrics=[..., elapsed_compute{partition=0}=88.506µs, output_rows{partition=0}=201]
      ScanExec: ..., metrics=[s..., elapsed_compute{partition=0}=5.461µs, output_rows{partition=0}=201]

What changes are included in this PR?

Add more metrics

How are these changes tested?

@andygrove andygrove marked this pull request as ready for review August 5, 2024 01:00
@@ -363,8 +363,7 @@ pub unsafe extern "system" fn Java_org_apache_comet_Native_executePlan(
if exec_context.debug_native {
if let Some(plan) = &exec_context.root_op {
let formatted_plan_str =
DisplayableExecutionPlan::with_full_metrics(plan.as_ref())
.indent(true);
DisplayableExecutionPlan::with_metrics(plan.as_ref()).indent(true);
Copy link
Member Author

Choose a reason for hiding this comment

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

with_full_metrics was too verbose

@andygrove andygrove requested a review from viirya August 5, 2024 21:31
@andygrove andygrove merged commit 5af85f6 into apache:main Aug 5, 2024
74 checks passed
@andygrove andygrove deleted the scan-exec-metrics branch August 5, 2024 23:08
himadripal pushed a commit to himadripal/datafusion-comet that referenced this pull request Sep 7, 2024
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.

2 participants