Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Track and report network stat#124

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
seanses wants to merge3 commits intomain
base:main
Choose a base branch
Loading
fromdi/network-stat-telemetry

Conversation

seanses
Copy link
Collaborator

@seansesseanses commentedDec 18, 2024
edited
Loading

In progress adding number of retries to the metrics.

Example tracing:

{"timestamp":"2024-12-18T10:04:56.945534Z","level":"INFO","fields":{"message":"Xorb upload accumulated rate: 74.54 Mbps"},"filename":"/home/ubuntu/data/xet-core/data/src/parallel_xorb_uploader.rs","line_number":90}{"timestamp":"2024-12-18T10:04:56.945589Z","level":"INFO","fields":{"message":"Xorb upload instantaneous rate: 74.54 Mbps"},"filename":"/home/ubuntu/data/xet-core/data/src/parallel_xorb_uploader.rs","line_number":90}{"timestamp":"2024-12-18T10:04:59.166637Z","level":"INFO","fields":{"message":"Xorb upload accumulated rate: 284.91 Mbps"},"filename":"/home/ubuntu/data/xet-core/data/src/parallel_xorb_uploader.rs","line_number":90}{"timestamp":"2024-12-18T10:04:59.166665Z","level":"INFO","fields":{"message":"Xorb upload instantaneous rate: 966.45 Mbps"},"filename":"/home/ubuntu/data/xet-core/data/src/parallel_xorb_uploader.rs","line_number":90}...{"timestamp":"2024-12-18T10:05:14.036182Z","level":"INFO","fields":{"message":"Xorb upload instantaneous rate: 2.62 Gbps"},"filename":"/home/ubuntu/data/xet-core/data/src/parallel_xorb_uploader.rs","line_number":90}{"timestamp":"2024-12-18T10:05:16.244455Z","level":"INFO","fields":{"message":"Xorb upload accumulated rate: 1.32 Gbps"},"filename":"/home/ubuntu/data/xet-core/data/src/parallel_xorb_uploader.rs","line_number":90}{"timestamp":"2024-12-18T10:05:16.244487Z","level":"INFO","fields":{"message":"Xorb upload instantaneous rate: 2.19 Gbps"},"filename":"/home/ubuntu/data/xet-core/data/src/parallel_xorb_uploader.rs","line_number":90}

@seansesseanses marked this pull request as draftDecember 18, 2024 10:11
@seansesseanses changed the titleTrack and report egress rateTrack and report network statDec 18, 2024
type XorbUploadValueType = (MerkleHash, Vec<u8>, Vec<(MerkleHash, usize)>);
struct NetworkStatCheckPoint {
n_bytes: u64,
start: Instant,

Choose a reason for hiding this comment

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

I found usingstd::time::SystemTime more useful in sending these over compared to Instant in#121

use utils::progress::ProgressUpdater;
use utils::ThreadPool;

use crate::data_processing::CASDataAggregator;
use crate::errors::DataProcessingError::*;
use crate::errors::*;

const DEFAULT_NETWORK_STAT_REPORT_INTERVAL_SEC: u32 = 2; // 2 s
Copy link

@port8080port8080Dec 18, 2024
edited
Loading

Choose a reason for hiding this comment

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

You probably have this set low for testing, would prefer larger in prod - maybe 100s

@@ -139,24 +217,28 @@ impl XorbUpload for ParallelXorbUploader {
let mut upload_tasks = self.upload_tasks.lock().await;

while let Some(result) = upload_tasks.join_next().await {
result??;
let metrics = result??;
let mut egress_rate = self.egress_stat.lock().await;

Choose a reason for hiding this comment

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

Try the lock and optimistically report. I think it is completely OK to skip theupdate_and_report call if there is lock contention

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@port8080port8080port8080 left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@seanses@port8080

[8]ページ先頭

©2009-2025 Movatter.jp