streambench

command
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2026 License: MIT Imports: 21 Imported by: ? 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

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.

Jump to

Keyboard shortcuts

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