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

Add debugger interface to allow extracting the workerStats from Worker #1363

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

ketsiambaku
Copy link
Contributor

@ketsiambaku ketsiambaku commented Sep 2, 2024

What changed?
This PR adds a debugger interface to the debug package

Why?
Currently the WorkerStats struct is injected in the client by passing it as a worker options however there is no way of retrieving the WorkerStats or its fields from a Worker instance unless we keep track of Trackers instances that were constructed and passed as options seperately. In this PR, we make improvement to the design by adding a debugger interface. The internal worker implementation implements Debugger and allow consumers to retrieve the WorkerStats

How did you test it?
Unit tests
Local Test

Potential risks

Copy link

codecov bot commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.50%. Comparing base (ed58224) to head (d3de151).
Report is 2 commits behind head on master.

Additional details and impacted files
Files with missing lines Coverage Δ
internal/internal_worker.go 80.49% <100.00%> (+0.16%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d320e7...d3de151. Read the comment docs.

Copy link
Contributor

@dkrotx dkrotx left a comment

Choose a reason for hiding this comment

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

Good approach!

@ketsiambaku ketsiambaku merged commit fd9956a into uber-go:master Sep 3, 2024
21 checks passed
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