rename to LoadAvg_1M
This commit is contained in:
@@ -147,7 +147,7 @@ message VacuumVolumeCompactRequest {
|
|||||||
}
|
}
|
||||||
message VacuumVolumeCompactResponse {
|
message VacuumVolumeCompactResponse {
|
||||||
int64 processed_bytes = 1;
|
int64 processed_bytes = 1;
|
||||||
float percent_load_avg_1m = 2;
|
float load_avg_1m = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message VacuumVolumeCommitRequest {
|
message VacuumVolumeCommitRequest {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@ func (vs *VolumeServer) VacuumVolumeCompact(req *volume_server_pb.VacuumVolumeCo
|
|||||||
resp.ProcessedBytes = processed
|
resp.ProcessedBytes = processed
|
||||||
if fsErr == nil && numCPU > 0 {
|
if fsErr == nil && numCPU > 0 {
|
||||||
if fsLa, err := fs.LoadAvg(); err == nil {
|
if fsLa, err := fs.LoadAvg(); err == nil {
|
||||||
resp.PercentLoadAvg_1M = float32(fsLa.Load1 / float64(numCPU))
|
resp.LoadAvg_1M = float32(fsLa.Load1 / float64(numCPU))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if sendErr = stream.Send(resp); sendErr != nil {
|
if sendErr = stream.Send(resp); sendErr != nil {
|
||||||
|
|||||||
@@ -89,8 +89,8 @@ func (t *Topology) batchVacuumVolumeCompact(grpcDialOption grpc.DialOption, vl *
|
|||||||
return recvErr
|
return recvErr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
glog.V(0).Infof("%d vacuum %d on %s processed %d bytes, loadAvg %.0f%%",
|
glog.V(0).Infof("%d vacuum %d on %s processed %d bytes, loadAvg %.02f%%",
|
||||||
index, vid, url, resp.ProcessedBytes, resp.PercentLoadAvg_1M)
|
index, vid, url, resp.ProcessedBytes, resp.LoadAvg_1M*100)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user