cmd

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Types

type BillingSummary

type BillingSummary struct {
	SKU        string  `bigquery:"sku_description"`
	TotalCost  float64 `bigquery:"total_cost"`
	TotalUsage float64 `bigquery:"total_usage_amount"`
	UsageUnit  string  `bigquery:"usage_unit"`
	Currency   string  `bigquery:"currency"`
}

type PlotModel

type PlotModel struct {
	Buckets   []analytics.Bucket
	Metric    string // "cost" or "tokens"
	TimeFrame time.Duration
	Width     int
	Height    int
}

func NewPlot

func NewPlot(buckets []analytics.Bucket, metric string, timeFrame time.Duration, width, height int) PlotModel

func (PlotModel) View

func (p PlotModel) View() string

type StackedPlotModel

type StackedPlotModel struct {
	DailySummaries []analytics.DailyBillingSummary
	TimeFrame      time.Duration
	Width          int
	Height         int
	TopSKUs        []string // Top SKUs to show in stacks
}

StackedPlotModel represents a plot with stacked bars by SKU

func NewStackedPlot

func NewStackedPlot(summaries []analytics.DailyBillingSummary, timeFrame time.Duration, width, height int) StackedPlotModel

NewStackedPlot creates a new stacked plot from billing data

func (StackedPlotModel) View

func (p StackedPlotModel) View() string

type TokenUsage

type TokenUsage struct {
	Timestamp        time.Time
	Method           string
	PromptTokens     int64
	CompletionTokens int64
	TotalTokens      int64
	CacheHit         bool
	Latency          float64
}

Jump to

Keyboard shortcuts

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