Documentation ¶
Index ¶
- func AddCheckStats(c check.Check, execTime time.Duration, err error, warnings []error, ...)
- func AddErrorsCount(amount int)
- func AddRunningCheckCount(amount int)
- func AddRunsCount(amount int)
- func AddWarningsCount(amount int)
- func CheckStats(id checkid.ID) (*checkstats.Stats, bool)
- func DeleteRunningStats(id checkid.ID)
- func DeleteWorkerStats(name string)
- func GetCheckStats() map[string]map[checkid.ID]*checkstats.Stats
- func GetErrorsCount() int64
- func GetRunningCheckCount() int64
- func GetRunningStats(id checkid.ID) time.Time
- func GetRunsCount() int64
- func GetWarningsCount() int64
- func GetWorkerCount() int
- func RemoveCheckStats(checkID checkid.ID)
- func Reset()
- func SetRunningStats(id checkid.ID, t time.Time)
- func SetWorkerStats(name string, ws *WorkerStats)
- type WorkerStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCheckStats ¶
func AddCheckStats( c check.Check, execTime time.Duration, err error, warnings []error, mStats checkstats.SenderStats, )
AddCheckStats adds runtime stats to the check's expvars
func AddErrorsCount ¶
func AddErrorsCount(amount int)
AddErrorsCount is used to increment the 'Errors' expvar
func AddRunningCheckCount ¶
func AddRunningCheckCount(amount int)
AddRunningCheckCount is used to increment and decrement the 'RunningChecks' expvar
func AddRunsCount ¶
func AddRunsCount(amount int)
AddRunsCount is used to increment and decrement the 'Runs' expvar
func AddWarningsCount ¶
func AddWarningsCount(amount int)
AddWarningsCount is used to increment the 'Warnings' expvar
func CheckStats ¶
func CheckStats(id checkid.ID) (*checkstats.Stats, bool)
CheckStats returns the check stats of a check, if they can be found
func DeleteRunningStats ¶
DeleteRunningStats clears the start time of a check when it's complete
func DeleteWorkerStats ¶
func DeleteWorkerStats(name string)
DeleteWorkerStats is used to remove instance information about a worker and update the count of the curretly running workers
func GetCheckStats ¶
func GetCheckStats() map[string]map[checkid.ID]*checkstats.Stats
GetCheckStats returns the check stats map
func GetErrorsCount ¶
func GetErrorsCount() int64
GetErrorsCount is used to get the value of 'Errors' expvar
func GetRunningCheckCount ¶
func GetRunningCheckCount() int64
GetRunningCheckCount is used to get the value of 'RunningChecks' expvar
func GetRunningStats ¶
GetRunningStats gets the start time of a running check
func GetRunsCount ¶
func GetRunsCount() int64
GetRunsCount is used to get the value of 'Runs' expvar
func GetWarningsCount ¶
func GetWarningsCount() int64
GetWarningsCount is used to get the value of 'Warnings' expvar
func GetWorkerCount ¶
func GetWorkerCount() int
GetWorkerCount is used to get the value of 'Workers'->'Count' expvar
func RemoveCheckStats ¶
RemoveCheckStats removes a check from the check stats map
func SetRunningStats ¶
SetRunningStats sets the start time of a running check
func SetWorkerStats ¶
func SetWorkerStats(name string, ws *WorkerStats)
SetWorkerStats is used to add individual worker stats or update them if they were already present
Types ¶
type WorkerStats ¶
type WorkerStats struct {
Utilization float64
}
WorkerStats is the update object that will be used to populate the individual `worker.Worker` instance expvar stats
func (*WorkerStats) String ¶
func (ws *WorkerStats) String() string
String is used by expvar package to print the variables