Documentation
¶
Overview ¶
Package stress builds synthetic worst-case sheets for the stress benchmarks (see docs/contributing/limits.md and `make stress`). Every generator is deterministic, so runs compare, and builds through the public API the way importers do: Load cell by cell, then one RecalcAll.
Index ¶
- Constants
- func Arrays(n, k int) *sheet.Sheet
- func Chain(n int) *sheet.Sheet
- func Charts(s *sheet.Sheet, k int)
- func Criteria(n, k int) *sheet.Sheet
- func Dense(rows, cols int) *sheet.Sheet
- func FanIn(n, k int) *sheet.Sheet
- func FanInColumns(n, k int) *sheet.Sheet
- func FanOut(k int) *sheet.Sheet
- func Laidout(rows, cols int) *sheet.Sheet
- func LongText(rows, n int) *sheet.Sheet
- func Lookup(n, k int) *sheet.Sheet
- func Names(k int) *sheet.Sheet
- func Nested(depth int) string
- func NestedIF(depth int) string
- func RunningTotals(n int) *sheet.Sheet
- func Sparse(n, stride, k int) *sheet.Sheet
- func Table(rows, cols int) *sheet.Sheet
- func Volatile(k int) *sheet.Sheet
- type Shape
Constants ¶
const ( Rows = 8192 Cols = 256 )
Rows and Cols are the size of the shapes: the grid of Lotus 1-2-3 that 012 had before it grew to Excel's, so runs before and after compare.
const ( MaxRows = 1_000_000 MaxCols = 10 )
MaxRows x MaxCols is sheet.DefaultMaxCells of numbers, the most an import keeps by default: a tall table, as imports make.
Variables ¶
This section is empty.
Functions ¶
func Arrays ¶ added in v0.2.0
Arrays is a column of n numbers beside a column of eight categories, and k formulas in row 1 spilling from them, alternating a FILTER of the numbers by one category (n/8 rows each) and the UNIQUE categories: k arrays over n rows, every number's change recomputing half of them.
func Chain ¶
Chain is A1=1 and A(n)=A(n-1)+1 down n rows: the deepest dependency path, evaluated recursively.
func Criteria ¶
Criteria is a table of n rows (a number, a category, an amount) and k conditional aggregates over whole columns of it: SUMIF, COUNTIFS with two conditions and AVERAGEIF in turn, each testing every row.
func FanIn ¶
FanIn is a column of n numbers and k formulas that each SUM all of it: k range users over the same big range.
func FanInColumns ¶
FanInColumns is FanIn with whole-column ranges, =SUM(A:A): the same data, read through a range of a million rows.
func Laidout ¶ added in v0.3.0
Laidout is a report of rows x cols: every cell bordered, a last column of notes that wrap over three lines, and a title merged across the top: what borders, tall rows and merged cells cost a frame.
func LongText ¶
LongText puts a length-n line of text, mixing ASCII, accents, CJK and emoji, in column A of rows rows and leaves everything else blank, so every row overflows across the whole screen.
func Lookup ¶
Lookup is n keys with a value beside each and k exact lookups into them: VLOOKUP, MATCH and XLOOKUP in turn, each key found somewhere along the column.
func Names ¶
Names defines k named ranges over a column of 8192 numbers and a formula using each: every changed cell is checked against every name.
func Nested ¶
Nested is a formula nested depth levels deep, e.g. =((((1+1)+1)+1)+1), in A1: the parser's and evaluator's recursion.
func RunningTotals ¶
RunningTotals is n numbers with a running SUM beside each: n overlapping ranges of growing size, O(n^2) cells read in all.
func Sparse ¶
Sparse is a tall, sparse sheet: n numbers every stride rows down column A, a label beside each, and k of each of three formulas over whole columns: =SUM(A:A), running totals to every thousandth row, and =VLOOKUP over A:B. Its cost should follow its n cells, not the million rows they span.
Types ¶
type Shape ¶
type Shape struct {
Name string
Build func() *sheet.Sheet
// Edit is a cell whose change touches the shape's interesting
// topology, for single-edit latency, and the entry to type there.
Edit sheet.Addr
Input string
}
Shape is one synthetic sheet: a name for benchmark output, and a builder. Rows and Cols describe the populated area.
Directories
¶
| Path | Synopsis |
|---|---|
|
Command benchrec turns `go test -bench` output into run records, one JSON line per benchmark, appended to a results file that DuckDB (and ClickHouse) read; see scripts/stress and docs/contributing/observability.md.
|
Command benchrec turns `go test -bench` output into run records, one JSON line per benchmark, appended to a results file that DuckDB (and ClickHouse) read; see scripts/stress and docs/contributing/observability.md. |