Versions in this module Expand all Collapse all v0 v0.2.0 May 15, 2026 Changes in this version + func ApplyFilters(input string, filters ...Filter) string + func CompareModels(results map[string]*SuiteResult) string + func DeltaCoverage(before, after *CoverageReport) string + func DiscoverTestPackages(projectDir string) ([]string, error) + func FindUncoveredFunctions(profile *CoverageReport, projectDir string) []string + func FormatReport(report *CoverageReport) string + func FormatResult(result *RunnerResult) string + func GenerateLeaderboard(results []SuiteResult) string + func GenerateReport(result *SuiteResult) string + func GenerateTestTemplate(funcName, pkg, signature string) string + func Percentile(durations []time.Duration, pct float64) time.Duration + func StripMarkdown(s string) string + func TrimExplanation(s string) string + type BenchmarkSuite struct + Name string + Results []TaskResult + Tasks []BenchmarkTask + func GoTasks() *BenchmarkSuite + type BenchmarkTask struct + Description string + Filters []Filter + ID string + MaxAttempts int + Prompt string + SetupFn func(workDir string) error + Tags []string + TimeLimit time.Duration + ValidateFn func(workDir string) (bool, string) + func LoadTasksFromYAML(dir string) ([]BenchmarkTask, error) + type Cache struct + Dir string + func DefaultCache() *Cache + func (c *Cache) Clear() error + func (c *Cache) Get(model, prompt string) *CacheEntry + func (c *Cache) Key(model, prompt string) string + func (c *Cache) Put(model, prompt, response string, tokens int, cost float64) error + type CacheEntry struct + CostUSD float64 + Model string + Prompt string + Response string + Tokens int + type CoverageAnalyzer struct + ProjectDir string + func NewCoverageAnalyzer(projectDir string) *CoverageAnalyzer + func (ca *CoverageAnalyzer) RunCoverage() (*CoverageReport, error) + type CoverageReport struct + CoveredLines int + Files []FileCoverage + Percentage float64 + Suggestions []TestSuggestion + TotalLines int + UncoveredFunctions []string + func ParseCoverageProfile(data string) (*CoverageReport, error) + type FileCoverage struct + CoveredLines int + Path string + Percentage float64 + TotalLines int + UncoveredRanges []LineRange + type Filter func(string) string + func ExtractCodeBlock(lang string) Filter + type GroupResult struct + Name string + PassRate float64 + Passed int + Total int + func AggregateGroupResults(groups []TaskGroup, results []TaskResult) []GroupResult + type LLMClient interface + Complete func(ctx context.Context, model, prompt string) (response string, tokens int, cost float64, err error) + type LineRange struct + End int + FunctionName string + Start int + type ModelBenchmark struct + Models []ModelConfig + Name string + Results map[string]*ModelResult + Runs int + Tasks []BenchmarkTask + func NewModelBenchmark(name string, models []ModelConfig) *ModelBenchmark + func (mb *ModelBenchmark) AnalyzeStrengths(model string) ([]string, []string) + func (mb *ModelBenchmark) Compare() string + func (mb *ModelBenchmark) ExportCSV() string + func (mb *ModelBenchmark) RankModels(by string) []ModelResult + func (mb *ModelBenchmark) RecommendModel(taskType string) string + func (mb *ModelBenchmark) RunAll(ctx context.Context, ...) error + type ModelConfig struct + MaxTokens int + Model string + Name string + Provider string + Temperature float64 + type ModelResult struct + AvgCostUSD float64 + AvgDuration time.Duration + AvgTokens int + Model string + P50Duration time.Duration + P95Duration time.Duration + PassRate float64 + Strengths []string + TaskResults []TaskResult + Weaknesses []string + type PackageResult struct + Duration time.Duration + Error string + Failed int + Output string + Package string + Passed int + Skipped int + Tests []TestCaseResult + type ParallelRunner struct + MaxWorkers int + Results map[string]*PackageResult + Timeout time.Duration + func NewParallelRunner(workers int) *ParallelRunner + func (r *ParallelRunner) GetFailed() []TestCaseResult + func (r *ParallelRunner) GetSlowest(n int) []TestCaseResult + func (r *ParallelRunner) RunAll(ctx context.Context, projectDir string) (*RunnerResult, error) + func (r *ParallelRunner) RunPackages(ctx context.Context, packages []string) (*RunnerResult, error) + func (r *ParallelRunner) RunSinglePackage(ctx context.Context, pkg string) *PackageResult + type ResultHash struct + Arch string + GitCommit string + GoVersion string + OS string + PromptHash string + TasksHash string + func ComputeHash(tasks []BenchmarkTask) *ResultHash + type ResultStore struct + Dir string + func DefaultResultStore() *ResultStore + func (s *ResultStore) List() ([]string, error) + func (s *ResultStore) Load(path string) (*StoredResult, error) + func (s *ResultStore) Save(result *SuiteResult, model, provider string, hash *ResultHash) (string, error) + type ResultSummary struct + Failed int + PassRate float64 + Passed int + TotalCostUSD float64 + TotalDuration string + TotalTasks int + TotalTokens int + type Runner struct + Cache *Cache + Filters []Filter + LLM LLMClient + MaxAttempts int + Model string + NoCache bool + Provider string + Timeout time.Duration + func NewRunner(model, provider string) *Runner + func (r *Runner) Run(ctx context.Context, suite *BenchmarkSuite) (*SuiteResult, error) + func (r *Runner) RunSingle(ctx context.Context, task *BenchmarkTask) (*TaskResult, error) + type RunnerResult struct + Duration time.Duration + Packages []PackageResult + Parallel int + TotalFailed int + TotalPassed int + TotalSkipped int + type StoredResult struct + Hash *ResultHash + Model string + Provider string + Suite string + Summary ResultSummary + Tasks []StoredTaskResult + Timestamp time.Time + Version string + type StoredTaskResult struct + Attempts int + CostUSD float64 + Duration string + Error string + Passed bool + Tags []string + TaskID string + Tokens int + type SuiteResult struct + Failed int + PassRate float64 + Passed int + Results []TaskResult + Suite string + TotalCostUSD float64 + TotalDuration time.Duration + TotalTasks int + TotalTokens int + type TaskGroup struct + Name string + Tags []string + Tasks []BenchmarkTask + func DefaultGroups() []TaskGroup + func GroupTasks(tasks []BenchmarkTask, groups []TaskGroup) []TaskGroup + type TaskResult struct + Attempts int + CostUSD float64 + Duration time.Duration + Error string + Passed bool + TaskID string + TokensUsed int + type TestCaseResult struct + Duration time.Duration + Name string + Output string + Passed bool + func ParseTestJSON(output string) []TestCaseResult + type TestSuggestion struct + File string + Function string + Priority string + Reason string + Template string + func SuggestTests(uncovered []string) []TestSuggestion + type YAMLTask struct + Description string + Files map[string]string + Filters []string + Language string + MaxAttempts int + Prompt string + Setup string + Tags []string + Task string + Timeout string + Validate []string