Skip to content

Commit

Permalink
Improve the UX for lotus-miner sealing workers: add total number of…
Browse files Browse the repository at this point in the history
… cores
  • Loading branch information
shaodan committed Oct 12, 2020
1 parent a6b2180 commit c0961fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/lotus-storage-miner/sealing.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ var sealingWorkersCmd = &cli.Command{
cpuBars := int(stat.CpuUse * barCols / stat.Info.Resources.CPUs)
cpuBar := strings.Repeat("|", cpuBars) + strings.Repeat(" ", int(barCols)-cpuBars)

fmt.Printf("\tCPU: [%s] %d core(s) in use\n", color.GreenString(cpuBar), stat.CpuUse)
fmt.Printf("\tCPU: [%s] %d/%d core(s) in use\n",
color.GreenString(cpuBar), stat.CpuUse, stat.Info.Resources.CPUs)

ramBarsRes := int(stat.Info.Resources.MemReserved * barCols / stat.Info.Resources.MemPhysical)
ramBarsUsed := int(stat.MemUsedMin * barCols / stat.Info.Resources.MemPhysical)
Expand Down

0 comments on commit c0961fb

Please sign in to comment.