Documentation
¶
Overview ¶
Package stats handles tracking and retrieval of commit statistics
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAverageLatency ¶
GetAverageLatency returns the average latency in seconds
func GetLastUsed ¶
GetLastUsed returns the time of the last commit
func GetMostUsedModel ¶
GetMostUsedModel returns the most frequently used model
func GetTotalCommits ¶
GetTotalCommits returns the total number of commits
func RecordCommit ¶
RecordCommit adds a new commit record to the stats
Types ¶
type CommitRecord ¶
type CommitRecord struct {
Timestamp time.Time `json:"timestamp"`
Model string `json:"model"`
Latency float64 `json:"latency"` // in seconds
CommitMsg string `json:"commit_msg"`
}
CommitRecord represents a single commit record
func GetRecentCommits ¶
func GetRecentCommits(limit int) ([]CommitRecord, error)
GetRecentCommits returns the most recent commits (up to limit)
Click to show internal directories.
Click to hide internal directories.