 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Process ¶
func Process(interim bool) (note.CommitNote, error)
Process events for last git commit and save time spent as a git note If interim is true, process events for the current working and staged files
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)
       Source Files
      ¶
      Source Files
      ¶
    
- manager.go
- metric.go
 Click to show internal directories. 
   Click to hide internal directories.