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

Operator addInput time is aggregated in source operator statistics #11959

Open
LeonidChistov opened this issue Dec 25, 2024 · 0 comments · May be fixed by #11960
Open

Operator addInput time is aggregated in source operator statistics #11959

LeonidChistov opened this issue Dec 25, 2024 · 0 comments · May be fixed by #11960
Labels
bug Something isn't working triage Newly created issue that needs attention.

Comments

@LeonidChistov
Copy link

LeonidChistov commented Dec 25, 2024

Bug description

Execution statistics (time, count, etc) of each operator addInput method call is currently associated and collected as part of source operator statistics.

In the current code

withDeltaCpuWallTimer(op, &OperatorStats::addInputTiming, [&]() {

we see following logic

withDeltaCpuWallTimer(op, &OperatorStats::addInputTiming, [&]() {
               ...
                CALL_OPERATOR(
                    nextOp->addInput(intermediateResult),
                    nextOp,
                    curOperatorId_ + 1,
                    kOpMethodAddInput);
              });

which causes nextOp->addInput statistics to be aggregated to input timing of op.

It looks like this logic was introduced in #10906 and it was different before:

 auto timer = createDeltaCpuWallTimer(
                  [nextOp, this](const CpuWallTiming& elapsedTime) {
                    auto elapsedSelfTime =
                        processLazyTiming(*nextOp, elapsedTime);
                    nextOp->stats().wlock()->addInputTiming.add(
                        elapsedSelfTime);
                  });

which probably means that it was just a typo in the Pull Request.

Current logic causes following statistics effect on the UI level, for example

Screenshot from 2024-12-25 13-34-15

Here we have large CPU time attributed to LocalExchange although it actually relates to HashAggregate::addInput run time and no CPU time for HashBuild since it is also "moved down" in the pipeline.

System information

/

Relevant logs

No response

@LeonidChistov LeonidChistov added bug Something isn't working triage Newly created issue that needs attention. labels Dec 25, 2024
@LeonidChistov LeonidChistov linked a pull request Dec 25, 2024 that will close this issue
@Yuhta Yuhta linked a pull request Dec 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Newly created issue that needs attention.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant