This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
JointCloud
/
JCS-pub
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
0
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
优化ping过程的延迟计算
gitlink
Sydonian
2 years ago
parent
2166767aae
commit
3c4696ee42
1 changed files
with
12 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+12
-0
common/pkgs/connectivity/collector.go
+ 12
- 0
common/pkgs/connectivity/collector.go
View File
@@ -177,6 +177,18 @@ func (r *Collector) ping(node cdssdk.Node) Connectivity {
}
defer stgglb.AgentRPCPool.Release(agtCli)
// 第一次ping保证网络连接建立成功
err = agtCli.Ping(*stgglb.Local.NodeID)
if err != nil {
log.Warnf("pre ping: %v", err)
return Connectivity{
ToNodeID: node.NodeID,
Delay: nil,
TestTime: time.Now(),
}
}
// 第二次ping计算延迟
start := time.Now()
err = agtCli.Ping(*stgglb.Local.NodeID)
if err != nil {
Write
Preview
Loading…
Cancel
Save