Documentation
¶
Index ¶
- type HeatmapData
- type HeatmapGenerator
- func (g *HeatmapGenerator) Generate(input string) *HeatmapData
- func (g *HeatmapGenerator) GenerateWithWaste(input string, wasteScore float64) *HeatmapData
- func (g *HeatmapGenerator) Summary(data *HeatmapData) string
- func (g *HeatmapGenerator) ToCSV(data *HeatmapData) string
- func (g *HeatmapGenerator) ToJSON(data *HeatmapData) ([]byte, error)
- type HeatmapRecord
- type HeatmapSection
- type HeatmapStore
- func (s *HeatmapStore) ExportCSV() string
- func (s *HeatmapStore) ExportJSON() ([]byte, error)
- func (s *HeatmapStore) GetAverages(days int) (map[string]float64, error)
- func (s *HeatmapStore) GetRecent(limit int) ([]HeatmapRecord, error)
- func (s *HeatmapStore) Init() error
- func (s *HeatmapStore) Record(data *HeatmapData, requestID string) error
- type SectionAnalyzer
- type SectionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HeatmapData ¶
type HeatmapData struct {
TotalTokens int `json:"total_tokens"`
Sections []HeatmapSection `json:"sections"`
WasteScore float64 `json:"waste_score"`
Timestamp int64 `json:"timestamp"`
}
type HeatmapGenerator ¶
type HeatmapGenerator struct {
// contains filtered or unexported fields
}
func NewHeatmapGenerator ¶
func NewHeatmapGenerator() *HeatmapGenerator
func (*HeatmapGenerator) Generate ¶
func (g *HeatmapGenerator) Generate(input string) *HeatmapData
func (*HeatmapGenerator) GenerateWithWaste ¶
func (g *HeatmapGenerator) GenerateWithWaste(input string, wasteScore float64) *HeatmapData
func (*HeatmapGenerator) Summary ¶
func (g *HeatmapGenerator) Summary(data *HeatmapData) string
func (*HeatmapGenerator) ToCSV ¶
func (g *HeatmapGenerator) ToCSV(data *HeatmapData) string
func (*HeatmapGenerator) ToJSON ¶
func (g *HeatmapGenerator) ToJSON(data *HeatmapData) ([]byte, error)
type HeatmapRecord ¶
type HeatmapRecord struct {
ID int64 `json:"id"`
RequestID string `json:"request_id"`
TotalTokens int `json:"total_tokens"`
WasteScore float64 `json:"waste_score"`
SystemPct float64 `json:"system_pct"`
ToolsPct float64 `json:"tools_pct"`
ContextPct float64 `json:"context_pct"`
HistoryPct float64 `json:"history_pct"`
QueryPct float64 `json:"query_pct"`
CreatedAt time.Time `json:"created_at"`
}
type HeatmapSection ¶
type HeatmapStore ¶
type HeatmapStore struct {
// contains filtered or unexported fields
}
func NewHeatmapStore ¶
func NewHeatmapStore(db *sql.DB) *HeatmapStore
func (*HeatmapStore) ExportCSV ¶
func (s *HeatmapStore) ExportCSV() string
func (*HeatmapStore) ExportJSON ¶
func (s *HeatmapStore) ExportJSON() ([]byte, error)
func (*HeatmapStore) GetAverages ¶
func (s *HeatmapStore) GetAverages(days int) (map[string]float64, error)
func (*HeatmapStore) GetRecent ¶
func (s *HeatmapStore) GetRecent(limit int) ([]HeatmapRecord, error)
func (*HeatmapStore) Init ¶
func (s *HeatmapStore) Init() error
func (*HeatmapStore) Record ¶
func (s *HeatmapStore) Record(data *HeatmapData, requestID string) error
type SectionAnalyzer ¶
type SectionAnalyzer struct {
// contains filtered or unexported fields
}
func NewSectionAnalyzer ¶
func NewSectionAnalyzer() *SectionAnalyzer
func (*SectionAnalyzer) Analyze ¶
func (a *SectionAnalyzer) Analyze(input string) []HeatmapSection
func (*SectionAnalyzer) ClassifyLine ¶
func (a *SectionAnalyzer) ClassifyLine(line string) SectionType
type SectionType ¶
type SectionType string
const ( SectionSystem SectionType = "system" SectionTools SectionType = "tools" SectionContext SectionType = "context" SectionHistory SectionType = "history" SectionQuery SectionType = "query" SectionOutput SectionType = "output" SectionUnknown SectionType = "unknown" )
Click to show internal directories.
Click to hide internal directories.