Documentation
¶
Overview ¶
Package benchutil contains measurement helpers, never product behavior.
Index ¶
- func Counts(ctx context.Context, d *sql.DB) map[string]int64
- func Dist(v []float64) map[string]any
- func FileSHA(path string) string
- func JSON(path string, v any) error
- func Manifest() map[string]any
- func NewDir(path string) error
- func RequireCopy(path string) error
- func SHA(b []byte) string
- func SnapshotCheckpointedIndex(ctx context.Context, d *sql.DB, src, dst string) error
- func WriteMechanismCases(path string, cases []MechanismCase) error
- type MechanismCandidate
- type MechanismCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequireCopy ¶
func SnapshotCheckpointedIndex ¶
SnapshotCheckpointedIndex copies only a disposable, quiescent fixture DB.
func WriteMechanismCases ¶
func WriteMechanismCases(path string, cases []MechanismCase) error
Types ¶
type MechanismCandidate ¶
type MechanismCandidate struct {
Hit model.SearchResult `json:"hit"`
Chunk string `json:"chunk"`
Window []contextpack.EvidenceRecord `json:"window"`
}
type MechanismCase ¶
type MechanismCase struct {
ID string `json:"id"`
Query string `json:"query"`
Owner string `json:"owner"`
Device string `json:"device"`
Index string `json:"index"`
Request contextpack.Request `json:"request"`
ModelMin float64 `json:"model_min"`
Baseline *contextpack.Pack `json:"baseline"`
Candidates []MechanismCandidate `json:"candidates"`
}
MechanismCase contains only selector inputs, never expected answers or types. Keep these exports private: they contain source text and local index paths.
func MakeMechanismCase ¶
func MakeMechanismCase(ctx context.Context, d *sql.DB, id, owner, device, index string, req contextpack.Request, modelMin float64, baseline *contextpack.Pack, hits []model.SearchResult) (MechanismCase, error)