Merge pull request #6942 from filecoin-project/asr/nit
Improve formatting of workers CLI
This commit is contained in:
commit
e5fb4a6c04
@ -91,7 +91,10 @@ var sealingWorkersCmd = &cli.Command{
|
||||
|
||||
var barCols = uint64(64)
|
||||
cpuBars := int(stat.CpuUse * barCols / stat.Info.Resources.CPUs)
|
||||
cpuBar := strings.Repeat("|", cpuBars) + strings.Repeat(" ", int(barCols)-cpuBars)
|
||||
cpuBar := strings.Repeat("|", cpuBars)
|
||||
if int(barCols)-cpuBars >= 0 {
|
||||
cpuBar += strings.Repeat(" ", int(barCols)-cpuBars)
|
||||
}
|
||||
|
||||
fmt.Printf("\tCPU: [%s] %d/%d core(s) in use\n",
|
||||
color.GreenString(cpuBar), stat.CpuUse, stat.Info.Resources.CPUs)
|
||||
|
Loading…
Reference in New Issue
Block a user