master > master: code go - messages verbessert
This commit is contained in:
@@ -103,8 +103,8 @@ func DisplayEndOfAlgorithm(outputs map[string]interface{}) {
|
||||
func DisplayMetrics() {
|
||||
// logging.Plain("Dauer der Ausführung: t = \033[1m%[1]v\033[0m", metrics.GetTimeElapsed())
|
||||
logging.Plain("Dauer der Ausführung: t = \033[1m%[1]v\033[0m", metrics.GetTimeElapsedLongFormat())
|
||||
logging.Plain("Kosten (Zeit): T(n) = \033[1m%[1]v\033[0m", metrics.GetTimeCost())
|
||||
logging.Plain("Kosten (Platz): S(n) = \033[1m%[1]v\033[0m", metrics.GetSpaceCost())
|
||||
logging.Plain("Kosten (Zeit): T(n) = \033[1m%[1]v\033[0m", displayCost(metrics.GetTimeCost()))
|
||||
logging.Plain("Kosten (Platz): S(n) = \033[1m%[1]v\033[0m", displayCost(metrics.GetSpaceCost()))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -120,3 +120,10 @@ func DisplayBar(options ...int) {
|
||||
logging.Plain("+%[1]s+", strings.Repeat("-", n))
|
||||
return
|
||||
}
|
||||
|
||||
func displayCost(cost int) string {
|
||||
if cost > 0 {
|
||||
return fmt.Sprintf("%v", cost)
|
||||
}
|
||||
return "-"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user