sandugood opened a new pull request, #1778:
URL: https://github.com/apache/datafusion-ballista/pull/1778
# Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases. You can
link an issue to this PR using the GitHub syntax. For example `Closes #123`
indicates that this PR will close issue #123.
-->
Closes #1743 .
# Rationale for this change
Right now we don't expose stage-level metrics via Scheduler's REST API
interface. We only have task level metrics (which are essential and explanatory
by themselves, but not full).
# What changes are included in this PR?
Added stage level metrics renderer following the logic how they are
connected on the executor side (DFS):
1. `format_node` is responsible for rendering the metrics in right order
2. `render_tree` is now the fallback parameter
Results for a `tpchgen-cli -s 1 --format parquet --output-dir testdata`
generated dataset.
```
curl -s localhost:50050/api/job/cjaZtGS/stages | jq -r
".stages.[1].stage_plan"
SortShuffleWriterExec: partitioning=Hash([c_custkey@0], 4),
metrics=[write_time=158.15ms, output_rows=150.0 K, spill_count=0,
repart_time=11.19ms, spill_time=4ns, input_rows=150.0 K, spill_bytes=0]
AggregateExec: mode=Partial, gby=[c_custkey@0 as c_custkey],
aggr=[sum(test_parquet.c_acctbal)], metrics=[elapsed_compute=94.16ms,
aggregation_time=5.38ms, output_rows=150.0 K, peak_mem_used=10.16 M,
output_bytes=45.0 MB, start_timestamp=2026-05-26 20:59:43.356634094 UTC,
skipped_aggregation_rows=0, emitting_time=62.03µs, output_batches=20,
aggregate_arguments_time=147.62µs, end_timestamp=2026-05-26 20:59:43.546108325
UTC, spilled_bytes=0.0 B, spill_count=0, reduction_factor=100% (150.0 K/150.0
K), spilled_rows=0, time_calculating_group_ids=87.23ms]
DataSourceExec: ...
# Are there any user-facing changes?
```
No, but the CLI rendering might be affected due to the changes in rendering
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]