From 752e82d80b5a93ca3561664313b0d828bb90afde Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Sun, 18 Apr 2021 01:01:10 -0400 Subject: [PATCH] Tidy up comments --- core/uptime.go | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/core/uptime.go b/core/uptime.go index d122295a..a03dc8af 100644 --- a/core/uptime.go +++ b/core/uptime.go @@ -13,14 +13,9 @@ const ( // Uptime is the struct that contains the relevant data for calculating the uptime as well as the uptime itself // and some other statistics type Uptime struct { - // LastSevenDays is the uptime percentage over the past 7 days - LastSevenDays float64 `json:"7d"` - - // LastTwentyFourHours is the uptime percentage over the past 24 hours - LastTwentyFourHours float64 `json:"24h"` - - // LastHour is the uptime percentage over the past hour - LastHour float64 `json:"1h"` + LastSevenDays float64 `json:"7d"` // Uptime percentage over the past 7 days + LastTwentyFourHours float64 `json:"24h"` // Uptime percentage over the past 24 hours + LastHour float64 `json:"1h"` // Uptime percentage over the past hour // SuccessfulExecutionsPerHour is a map containing the number of successes (value) // for every hourly unix timestamps (key) @@ -98,16 +93,6 @@ func (uptime *Uptime) ProcessResult(result *Result) { uptime.recalculate() } } - // cute print - //b, _ := json.MarshalIndent(uptime.TotalExecutionsPerHour, "", " ") - //fmt.Println("TotalExecutionsPerHour:", string(b)) - //b, _ = json.MarshalIndent(uptime.SuccessfulExecutionsPerHour, "", " ") - //fmt.Println("SuccessfulExecutionsPerHour:", string(b)) - //b, _ = json.MarshalIndent(uptime.TotalRequestResponseTimePerHour, "", " ") - //fmt.Println("TotalRequestResponseTimePerHour:", string(b)) - //for unixTimestamp, executions := range uptime.TotalExecutionsPerHour { - // fmt.Printf("average for %d was %d\n", unixTimestamp, uptime.TotalRequestResponseTimePerHour[unixTimestamp]/executions) - //} } func (uptime *Uptime) recalculate() {