Documentation
¶
Overview ¶
Package benchmark parses and validates code-review benchmark suites.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalid means a benchmark suite is malformed or violates the schema. ErrInvalid = errors.New("benchmark: invalid") )
Functions ¶
func Normalize ¶
func Normalize(suite *SuiteFile)
Normalize trims user-facing scalar fields in a suite document.
Types ¶
type Anchor ¶
type Anchor struct {
ID string `yaml:"id" json:"id"`
File string `yaml:"file" json:"file"`
Side string `yaml:"side" json:"side"`
Lines []int `yaml:"lines" json:"lines"`
}
Anchor is optional non-scoring placement metadata for a case.
type Candidate ¶
type Candidate struct {
ID string `yaml:"id" json:"id"`
Profile string `yaml:"profile" json:"profile"`
Model string `yaml:"model,omitempty" json:"model,omitempty"`
Effort string `yaml:"effort,omitempty" json:"effort,omitempty"`
AgentDirs []string `yaml:"agent_dirs,omitempty" json:"agent_dirs,omitempty"`
MaxAgents int `yaml:"max_agents,omitempty" json:"max_agents,omitempty"`
MaxConcurrency int `yaml:"max_concurrency,omitempty" json:"max_concurrency,omitempty"`
// contains filtered or unexported fields
}
Candidate is one review configuration to try against each selected case.
type Case ¶
type Case struct {
ID string `yaml:"id" json:"id"`
PR string `yaml:"pr" json:"pr"`
ExpectedBaseSHA string `yaml:"expected_base_sha,omitempty" json:"expected_base_sha,omitempty"`
ExpectedHeadSHA string `yaml:"expected_head_sha,omitempty" json:"expected_head_sha,omitempty"`
Anchors []Anchor `yaml:"anchors,omitempty" json:"anchors,omitempty"`
// contains filtered or unexported fields
}
Case is one pull request to review during a benchmark.
type Suite ¶
type Suite struct {
ID string `yaml:"id" json:"id"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Version int `yaml:"version,omitempty" json:"version,omitempty"`
}
Suite identifies a collection of benchmark cases and candidates.
Click to show internal directories.
Click to hide internal directories.