Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileMetric ¶
type FileMetric struct { Updated bool // Updated signifies if we need to save the metric file SourceFile string TimeSpent int Timeline map[int64]int }
FileMetric contains the source file and it's time metrics
func (*FileMetric) AddTimeSpent ¶
func (f *FileMetric) AddTimeSpent(ep int64, t int)
AddTimeSpent accumulates time spent for a source file
func (*FileMetric) Downsample ¶
func (f *FileMetric) Downsample()
Downsample return timeline by hour
func (*FileMetric) SortEpochs ¶
func (f *FileMetric) SortEpochs() []int64
SortEpochs returns sorted timeline epochs
type FileMetricByTime ¶
type FileMetricByTime []FileMetric
FileMetricByTime is an array of FileMetrics
func (FileMetricByTime) Len ¶
func (a FileMetricByTime) Len() int
func (FileMetricByTime) Less ¶
func (a FileMetricByTime) Less(i, j int) bool
func (FileMetricByTime) Swap ¶
func (a FileMetricByTime) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.