rename to LoadAvg_1M

This commit is contained in:
Konstantin Lebedev 2022-08-01 21:32:21 +05:00
parent 2f85e31f5c
commit fc65122766
4 changed files with 856 additions and 857 deletions

View file

@ -147,7 +147,7 @@ message VacuumVolumeCompactRequest {
}
message VacuumVolumeCompactResponse {
int64 processed_bytes = 1;
float percent_load_avg_1m = 2;
float load_avg_1m = 2;
}
message VacuumVolumeCommitRequest {

File diff suppressed because it is too large Load diff

View file

@ -40,7 +40,7 @@ func (vs *VolumeServer) VacuumVolumeCompact(req *volume_server_pb.VacuumVolumeCo
resp.ProcessedBytes = processed
if fsErr == nil && numCPU > 0 {
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 {

View file

@ -89,8 +89,8 @@ func (t *Topology) batchVacuumVolumeCompact(grpcDialOption grpc.DialOption, vl *
return recvErr
}
}
glog.V(0).Infof("%d vacuum %d on %s processed %d bytes, loadAvg %.0f%%",
index, vid, url, resp.ProcessedBytes, resp.PercentLoadAvg_1M)
glog.V(0).Infof("%d vacuum %d on %s processed %d bytes, loadAvg %.02f%%",
index, vid, url, resp.ProcessedBytes, resp.LoadAvg_1M*100)
}
return nil
})