Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllStats ¶
type AllStats struct { MaxN int Prefix *Heaps[string] PerUser PerIDStats PerGroup PerIDStats ByUser *Heaps[int64] ByGroup *Heaps[int64] // contains filtered or unexported fields }
AllStats is a collection of statistics for a given prefix and includes: - the top N values for each statistic by prefix - the total for each statistic - the top N values for/per each statistic by user/group - the topN user/groups by each statistic
func NewAllStats ¶
func (*AllStats) PushPerGroupStats ¶
func (s *AllStats) PushPerGroupStats(prefix string, ug stats.PerIDTotals)
func (*AllStats) PushPerUserStats ¶
func (s *AllStats) PushPerUserStats(prefix string, us stats.PerIDTotals)
type Heaps ¶
type Heaps[T comparable] struct { MaxN int Prefix string TotalBytes, TotalStorageBytes int64 TotalFiles, TotalPrefixes int64 TotalPrefixBytes int64 TotalHardlinks int64 TotalHardlinkDirs int64 Bytes *heap.MinMax[int64, T] StorageBytes *heap.MinMax[int64, T] PrefixBytes *heap.MinMax[int64, T] Files *heap.MinMax[int64, T] Prefixes *heap.MinMax[int64, T] }
Heaps is a collection of heap data structures for determining the top N values for a set of statistics and also for computing the total for those statistics. The Prefix refers to the root of the hierarchy for which the statistics are being computed.
func (*Heaps[T]) Merge ¶
func (h *Heaps[T]) Merge(n int) map[T]MergedStats
type MergedStats ¶
type MergedStats struct { Prefix string `json:"prefix,omitempty"` ID int64 `json:"id,omitempty"` IDName string `json:"name,omitempty"` Bytes int64 `json:"bytes"` Storage int64 `json:"storage,omitempty"` Files int64 `json:"files"` Prefixes int64 `json:"prefixes"` PrefixBytes int64 `json:"prefix_bytes"` }
type PerIDStats ¶
PerIDStats is a collection of statistics on a per user/group basis.
Click to show internal directories.
Click to hide internal directories.