1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: per-user heartbeats count metrics

This commit is contained in:
Ferdinand Mütsch
2021-02-12 23:06:48 +01:00
parent 703805412b
commit 301cab4be4
8 changed files with 148 additions and 61 deletions

View File

@ -92,6 +92,10 @@ func (s *Summary) MappedItems() map[uint8]*SummaryItems {
}
}
func (s *Summary) ItemsByType(summaryType uint8) *SummaryItems {
return s.MappedItems()[summaryType]
}
/* Augments the summary in a way that at least one item is present for every type.
If a summary has zero items for a given type, but one or more for any of the other types,
the total summary duration can be derived from those and inserted as a dummy-item with key "unknown"