Fix godoc style comments (#356)
This commit is contained in:
committed by
GitHub
parent
8f921fbfde
commit
2e1f8d29b5
@@ -5,13 +5,13 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// The "start" timestamp of a timing event
|
||||
// The "start" timestamp of a timing event.
|
||||
var _pointsInTime = make(map[string]time.Time)
|
||||
|
||||
// A collection of timestamp durations for returning the average of
|
||||
// A collection of timestamp durations for returning the average of.
|
||||
var _durationStorage = make(map[string][]float64)
|
||||
|
||||
// StartPerformanceMonitor will keep track of the start time of this event
|
||||
// StartPerformanceMonitor will keep track of the start time of this event.
|
||||
func StartPerformanceMonitor(key string) {
|
||||
if len(_durationStorage[key]) > 30 {
|
||||
_durationStorage[key] = removeHighAndLow(_durationStorage[key])
|
||||
@@ -19,7 +19,7 @@ func StartPerformanceMonitor(key string) {
|
||||
_pointsInTime[key] = time.Now()
|
||||
}
|
||||
|
||||
// GetAveragePerformance will return the average durations for the event
|
||||
// GetAveragePerformance will return the average durations for the event.
|
||||
func GetAveragePerformance(key string) float64 {
|
||||
timestamp := _pointsInTime[key]
|
||||
if timestamp.IsZero() {
|
||||
|
||||
Reference in New Issue
Block a user