stats

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentStat

type AgentStat struct {
	Name         string
	Sessions     int
	Events       int
	FilesRead    int
	FilesWritten int
	Commands     int
	Errors       int
	Cost         float64
}

type CommandStat

type CommandStat struct {
	Command   string
	Count     int
	FailCount int
}

type CostBucket added in v0.4.0

type CostBucket struct {
	Label string
	Cost  float64
}

type FileStat

type FileStat struct {
	Path         string
	WriteCount   int
	LinesAdded   int
	LinesRemoved int
}

type Model

type Model struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type ModelStat added in v0.4.0

type ModelStat struct {
	Name         string
	Sessions     int
	InputTokens  int64
	OutputTokens int64
	TotalTokens  int64
	Cost         float64
}

type Options

type Options struct {
	Store       storage.Store
	TimeRange   TimeRange
	AgentFilter string
	Since       *time.Time
	Until       *time.Time
}

type StatsData

type StatsData struct {
	TotalEvents    int
	TotalSessions  int
	ActiveSessions int
	UniqueAgents   int

	FileReads       int
	FileWrites      int
	FileDeletes     int
	CommandExecs    int
	ToolUses        int
	NetworkRequests int

	Agents []AgentStat

	TimelineBuckets []TimelineBucket

	LinesAdded          int
	LinesRemoved        int
	UniqueFilesModified int
	TopFiles            []FileStat
	WorkingDirs         []string

	TotalCommands  int
	PassedCommands int
	FailedCommands int
	TopCommands    []CommandStat

	TotalErrors   int
	TotalBlocked  int
	TotalRejected int

	TotalCost         float64
	SessionsWithCost  int
	AvgCostPerSession float64
	CostBuckets       []CostBucket
	ModelStats        []ModelStat
	TotalInputTokens  int64
	TotalOutputTokens int64
	TotalCacheRead    int64
	TotalCacheWrite   int64

	AvgDuration       time.Duration
	AvgActionsPerSess float64
	LongestSession    time.Duration
	ShortestSession   time.Duration
	PeakConcurrent    int

	TimeSpanStart time.Time
	TimeSpanEnd   time.Time
}

type TimeRange

type TimeRange int
const (
	RangeToday TimeRange = iota
	Range7Days
	Range30Days
	RangeAll
)

func (TimeRange) Since

func (r TimeRange) Since() *time.Time

func (TimeRange) String

func (r TimeRange) String() string

func (TimeRange) Until added in v0.3.3

func (r TimeRange) Until() *time.Time

type TimelineBucket added in v0.3.3

type TimelineBucket struct {
	Label string
	Count int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL