Documentation
¶
Overview ¶
Command streambench measures the memory and time of one XSLT transform run on a tree (xdm.Parse + Stylesheet.Transform) against the same transform streamed (Stylesheet.TransformReader), over generated documents of growing size. docs/benchmark.md ("Streaming against the tree") reports its figures.
go run ./tests/streambench [-records 60000,600000,3000000] [-reps 3] [-dir d]
Each run is a child process of its own, so its peak RSS is its alone; the child also samples its live heap every millisecond. Peak RSS comes from the child's rusage (rss_unix.go); where the platform reports none (Windows) the column is empty and peak heap is the figure to read. A record is about 185 bytes, so the default sizes are 11, 112 and 564 MB. The documents are written to -dir (a temporary directory when unset) and removed after, unless -keep. Both modes write the principal result to TransformOptions.Output, so neither holds a result tree; the command fails when the two modes' outputs differ.
The parse limits are lifted (MaxBytes and MaxNodes -1) so the tree can hold the largest document; the tree's peak is several times the input, so the default sizes want about 4 GB free.