feat(lotus-sim): print duration info in days

This commit is contained in:
Steven Allen 2021-06-10 12:32:41 -07:00
parent 1df5445ed2
commit d551f2b4bd

View File

@ -65,11 +65,12 @@ func printInfo(ctx context.Context, sim *simulation.Simulation, out io.Writer) e
fmt.Fprintf(tw, "Name:\t%s\n", sim.Name())
fmt.Fprintf(tw, "Head:\t%s\n", head)
fmt.Fprintf(tw, "Last Epoch:\t%d\n", headEpoch)
fmt.Fprintf(tw, "First Epoch:\t%d\n", firstEpoch)
fmt.Fprintf(tw, "Start Epoch:\t%d\n", firstEpoch)
fmt.Fprintf(tw, "End Epoch:\t%d\n", headEpoch)
fmt.Fprintf(tw, "Length:\t%d\n", headEpoch-firstEpoch)
fmt.Fprintf(tw, "Date:\t%s\n", headTime)
fmt.Fprintf(tw, "Duration:\t%s\n", duration)
fmt.Fprintf(tw, "Start Date:\t%s\n", startTime)
fmt.Fprintf(tw, "End Date:\t%s\n", headTime)
fmt.Fprintf(tw, "Duration:\t%.2f day(s)\n", duration.Hours()/24)
fmt.Fprintf(tw, "Power:\t%s\n", types.SizeStr(powerNow.RawBytePower))
fmt.Fprintf(tw, "Power Growth:\t%s\n", types.SizeStr(powerGrowth))
fmt.Fprintf(tw, "Power Growth Rate:\t%s/day\n", types.SizeStr(growthRate))