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

feat: Add ability to broadcast daft metrics over HTTP #3778

Closed
wants to merge 7 commits into from

Conversation

raunakab
Copy link
Contributor

@raunakab raunakab commented Feb 6, 2025

Overview

This PR adds the ability of broadcasting the serialized Mermaid query plan over port 3238.
Receiving services can listen to this TCP broadcast over 3238, read the data, and process/present it.

This will be useful for the dashboard, which will (through another proxy service) be listening over 3238 for the plan, so that it can display it to the end-user.

Notes

This is a refreshed version of this closed PR.

Port choice

The default port to broadcast on was chosen to be 3238. The reason here being because that is daft spelled over the telephone's alphanumeric keypad.

image

@raunakab raunakab changed the title Change broadcasting method from context based to env based feat: Add ability to broadcast daft metrics over HTTP Feb 6, 2025
@github-actions github-actions bot added the feat label Feb 6, 2025
Copy link

codspeed-hq bot commented Feb 6, 2025

CodSpeed Performance Report

Merging #3778 will degrade performances by 18.04%

Comparing broadcast-metrics (8157579) with main (8759b62)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 25 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
test_iter_rows_first_row[100 Small Files] 178.9 ms 218.3 ms -18.04%
test_show[100 Small Files] 23.8 ms 15.9 ms +49.59%

@raunakab raunakab marked this pull request as ready for review February 6, 2025 20:39
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

Attention: Patch coverage is 67.56757% with 12 lines in your changes missing coverage. Please review.

Project coverage is 77.85%. Comparing base (8759b62) to head (ca81621).

Files with missing lines Patch % Lines
daft/dataframe/dataframe.py 67.56% 12 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3778      +/-   ##
==========================================
+ Coverage   75.59%   77.85%   +2.26%     
==========================================
  Files         739      740       +1     
  Lines       97206    93803    -3403     
==========================================
- Hits        73484    73034     -450     
+ Misses      23722    20769    -2953     
Files with missing lines Coverage Δ
daft/dataframe/dataframe.py 84.86% <67.56%> (-0.65%) ⬇️

... and 45 files with indirect coverage changes

daft/dataframe/dataframe.py Outdated Show resolved Hide resolved
daft/dataframe/dataframe.py Show resolved Hide resolved
daft/dataframe/dataframe.py Outdated Show resolved Hide resolved
def broadcast_metrics(f):
@wraps(f)
def wrapped(self, *args, **kwargs):
self._explain_broadcast()
Copy link
Contributor

Choose a reason for hiding this comment

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

I still think this is wrong because most of the functions f will add to the plan before execution. E.g. write_parquet will add a write parquet node to the plan.

@raunakab
Copy link
Contributor Author

Closing in favour of #3790.

@raunakab raunakab closed this Feb 18, 2025
@raunakab raunakab deleted the broadcast-metrics branch February 18, 2025 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants