-
Notifications
You must be signed in to change notification settings - Fork 114
[server][dvc] Add blob transfer send/receive byte rate metric at both version level and host level #2338
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
Open
sixpluszero
wants to merge
7
commits into
linkedin:main
Choose a base branch
from
sixpluszero:blobTransferTrafficMetric
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[server][dvc] Add blob transfer send/receive byte rate metric at both version level and host level #2338
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
98c06b3
[server][dvc] Add blob transfer send/receive byte rate metric at both…
sixpluszero 4488c3a
fix test
sixpluszero 0a1ae7e
fix test
sixpluszero 2e0229c
fix
sixpluszero 994aa20
fix test
sixpluszero 5170ec0
add unit test coverage
sixpluszero d861ae7
Add java docs
sixpluszero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
clients/da-vinci-client/src/main/java/com/linkedin/davinci/stats/AggBlobTransferStats.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| package com.linkedin.davinci.stats; | ||
|
|
||
| /** | ||
| * Aggregates blob transfer statistics across both versioned and host-level metrics. | ||
| * This class serves as a facade that coordinates recording blob transfer events to both | ||
| * version-specific statistics and host-level aggregated statistics. | ||
| */ | ||
| public class AggBlobTransferStats { | ||
| private final AggVersionedBlobTransferStats aggVersionedBlobTransferStats; | ||
| private final AggHostLevelIngestionStats aggHostLevelIngestionStats; | ||
|
|
||
| /** | ||
| * Constructs an AggBlobTransferStats instance. | ||
| * | ||
| * @param aggVersionedBlobTransferStats the versioned blob transfer statistics aggregator | ||
| * @param aggHostLevelIngestionStats the host-level ingestion statistics aggregator | ||
| */ | ||
| public AggBlobTransferStats( | ||
| AggVersionedBlobTransferStats aggVersionedBlobTransferStats, | ||
| AggHostLevelIngestionStats aggHostLevelIngestionStats) { | ||
| this.aggHostLevelIngestionStats = aggHostLevelIngestionStats; | ||
| this.aggVersionedBlobTransferStats = aggVersionedBlobTransferStats; | ||
| } | ||
|
|
||
| /** | ||
| * Records the number of bytes sent during a blob transfer operation. | ||
| * This method updates both version-specific and host-level statistics. | ||
| * | ||
| * @param storeName the name of the Venice store | ||
| * @param version the version number of the store | ||
| * @param value the number of bytes sent | ||
| */ | ||
| public void recordBlobTransferBytesSent(String storeName, int version, long value) { | ||
| aggVersionedBlobTransferStats.recordBlobTransferBytesSent(storeName, version, value); | ||
| HostLevelIngestionStats totalStats = aggHostLevelIngestionStats.getTotalStats(); | ||
| if (totalStats != null) { | ||
| totalStats.recordTotalBlobTransferBytesSend(value); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Records the number of bytes received during a blob transfer operation. | ||
| * This method updates both version-specific and host-level statistics. | ||
| * | ||
| * @param storeName the name of the Venice store | ||
| * @param version the version number of the store | ||
| * @param value the number of bytes received | ||
| */ | ||
| public void recordBlobTransferBytesReceived(String storeName, int version, long value) { | ||
| aggVersionedBlobTransferStats.recordBlobTransferBytesReceived(storeName, version, value); | ||
| HostLevelIngestionStats totalStats = aggHostLevelIngestionStats.getTotalStats(); | ||
| if (totalStats != null) { | ||
| totalStats.recordTotalBlobTransferBytesReceived(value); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Returns the versioned blob transfer statistics aggregator. | ||
| * | ||
| * @return the {@link AggVersionedBlobTransferStats} instance | ||
| */ | ||
| public AggVersionedBlobTransferStats getAggVersionedBlobTransferStats() { | ||
| return aggVersionedBlobTransferStats; | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s add some Javadoc here. Also, could you include the Kafka stats it will be compared against?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add doc that
aggVersionedBlobTransferStatsreports speed, time, and success/failure counts, andaggHostLevelIngestionStatsreports bytes accumulation?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good callout, updated the java doc.