Documentation
¶
Overview ¶
Package testcorpus builds deterministic synthetic API transaction corpora for benchmarks and performance-verification tests.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(opts Options) []proxy.APITransaction
Build returns a deterministic corpus of N transactions.
func WriteSessionFile ¶
func WriteSessionFile(dir, name string, txs []proxy.APITransaction) error
WriteSessionFile writes transactions to a session file in the same layout FileStorage produces: a JSON array, one transaction per line.
Types ¶
type Options ¶
type Options struct {
// N is the total number of transactions.
N int
// Paths is the number of distinct request paths; 0 defaults to 10.
Paths int
// DistinctBodies is the number of structurally distinct body shapes;
// 0 defaults to N.
DistinctBodies int
// RepeatedBodies cycles transactions through DistinctBodies byte-identical
// body shapes. When false, every transaction receives a structurally
// unique body.
RepeatedBodies bool
}
Options configures corpus generation.
Click to show internal directories.
Click to hide internal directories.