GetStats returns a copy of the current stats.
()
| 96 | |
| 97 | // GetStats returns a copy of the current stats. |
| 98 | func (pd *PatternDetector) GetStats() UsageStats { |
| 99 | pd.mu.RLock() |
| 100 | defer pd.mu.RUnlock() |
| 101 | return pd.stats |
| 102 | } |
| 103 | |
| 104 | // GetPeakHours returns the top N hours of activity. |
| 105 | func (pd *PatternDetector) GetPeakHours(n int) []int { |
no outgoing calls
no test coverage detected