Add GetAverageResponseTimeByKey method on store for response time badges

This commit is contained in:
TwinProduction authored and Chris committed 2021-08-21 18:12:06 -04:00
1 parent e8adc75afe
commit 75d8b40327
3 files changed
+84

No files matched your search

+3
View File
@@ -24,6 +24,9 @@ type Store interface {
// GetUptimeByKey returns the uptime percentage during a time range
GetUptimeByKey(key string, from, to time.Time) (float64, error)
// GetAverageResponseTimeByKey returns the average response time in milliseconds (value) during a time range
GetAverageResponseTimeByKey(key string, from, to time.Time) (int, error)
// GetHourlyAverageResponseTimeByKey returns a map of hourly (key) average response time in milliseconds (value) during a time range
GetHourlyAverageResponseTimeByKey(key string, from, to time.Time) (map[int64]int, error)