benchsummary

package
v0.7.114 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package benchsummary counts the same and differ results of the advice benchmark and prints them as one line, so the share of advice that agrees with the game data and the Forever guides can be read per run. A benchmark prints a count line per area; Total adds the area lines up.

Index

Constants

View Source
const Prefix = "advice-benchmark-count"

Prefix starts every count line a benchmark area prints.

Variables

This section is empty.

Functions

func AppendTable added in v0.7.95

func AppendTable(path, title string, rows []Row) error

AppendTable appends the rows to the Markdown file at path as a table under title. It does nothing for an empty path or no rows.

func AreaLine

func AreaLine(area string, results []string) string

AreaLine is the count line one benchmark area prints: "advice-benchmark-count professions same=174 differ=37".

func Count

func Count(results []string) (same, differ int)

Count is the number of results that match and the number that differ. A result is "match" or begins with "differ"; anything else (a skipped check) counts as neither.

func Total

func Total(r io.Reader) (line string, ok bool)

Total reads the count lines among the lines of r and returns the one summary line: the totals first, then each area, "advice-benchmark: 211 checks, 185 same, 26 differ (professions 174/37, stats 99/0)". It reports ok false when no count line is found.

Types

type Row added in v0.7.95

type Row struct{ Check, Advisor, Reference, Source, Result string }

Row is one line of a benchmark table: the check, the advisor's answer, the reference value, where the reference comes from, and the result ("match", or "differ" with a reason).

Directories

Path Synopsis
Command cmd reads the output of the advice benchmark on stdin and prints its one summary line.
Command cmd reads the output of the advice benchmark on stdin and prints its one summary line.

Jump to

Keyboard shortcuts

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