stats

package
v1.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Calculator

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

Calculator computes agent statistics

func NewCalculator

func NewCalculator(agents []*parser.AgentSpec) *Calculator

NewCalculator creates a new stats calculator

func (*Calculator) Calculate

func (c *Calculator) Calculate() *Statistics

Calculate computes all statistics for the agent collection

func (*Calculator) CalculateSourceStats

func (c *Calculator) CalculateSourceStats() map[string]*Statistics

CalculateSourceStats calculates statistics grouped by source

func (*Calculator) GetTopTools

func (c *Calculator) GetTopTools(limit int) []struct {
	Tool  string `json:"tool"`
	Count int    `json:"count"`
}

GetTopTools returns the most commonly used tools in descending order

func (*Calculator) GetValidationReport

func (c *Calculator) GetValidationReport() map[string]interface{}

GetValidationReport provides detailed validation results

type CoverageStats

type CoverageStats struct {
	WithName        int     `json:"with_name"`
	WithDescription int     `json:"with_description"`
	WithTools       int     `json:"with_tools"`
	WithPrompt      int     `json:"with_prompt"`
	AverageCoverage float64 `json:"average_coverage"`
}

CoverageStats shows field coverage statistics

type Statistics

type Statistics struct {
	TotalAgents    int                 `json:"total_agents"`
	BySource       map[string]int      `json:"by_source"`
	Coverage       CoverageStats       `json:"coverage"`
	ToolUsage      ToolStats           `json:"tool_usage"`
	Duplicates     map[string][]string `json:"duplicates"`
	OrphanedAgents int                 `json:"orphaned_agents"`
}

Statistics holds computed statistics

type ToolStats

type ToolStats struct {
	InheritedTools   int            `json:"inherited_tools"`
	ExplicitTools    int            `json:"explicit_tools"`
	ToolDistribution map[string]int `json:"tool_distribution"`
}

ToolStats shows tool usage statistics

Jump to

Keyboard shortcuts

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