Documentation
¶
Overview ¶
Package reporttest builds synthetic Gatling logs for tests and benchmarks.
A recorded log is a few kilobytes; the memory goal is about logs of gigabytes. Replay yields a text log of any size from one recording without writing a file or holding the log in memory, which is what lets a test measure the reader rather than the fixture.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Replay ¶
Replay returns a reader that yields header once and then body n times. Reads are served from the recording's bytes directly; nothing is copied ahead of time, so a replay of gigabytes costs the size of one recording.
A negative n yields the header alone, as zero does.
func Split ¶
Split divides a text simulation.log into its header — every line through the RUN record — and its body, the events after it. Both keep their trailing newline, so header followed by body is the log again.
The header is capped to its own length, so appending to it cannot reach into the body it was cut from. A log whose last line is unterminated is refused: its body would end mid-record, and repeating it would splice that record onto the next copy's first one.
Types ¶
This section is empty.