RehearsalDriver

The load driver of the blue-green rehearsal (.1), against the 9.x example-server or the rehearsal host:

driver seed    --version=9x|v10 --base=<url> --book=<file> --orders=N [--carts=M] [--tenants=T] [--concurrency=C]
driver traffic --version=9x|v10 --base=<url> --book=<file> --seconds=S [--touched=<file>] [--create=K] [--concurrency=C]
driver await --base=<v10 url> --touched=<file> [--timeout=S]
driver states --version=9x|v10 --base=<url> --book=<file> --out=<file> [--sample=N]
driver access --base=<v10 url> --book=<file> [--tenant=t0] [--sample=N]
driver compare <states a> <states b>
driver views … (the view store's part, see ViewsDriver)
  • seed creates N orders, each taken through a lifecycle drawn from its index (some only created, some with a changed address, some paid, shipped and received), and M carts; the order book records where each order stands. Half the orders are tagged, before any address change, with a region and teams (9.x's tags command); some are tagged again with another region and no team, some cleared.

  • traffic moves existing orders on by one step at a time for S seconds, and adds to carts; with --create, it creates K new orders instead, and nothing else. Some of its steps tag an order again. It records each order it wrote and its version in the touched file.

  • await waits until the rehearsal host holds every touched order at its version: the tail's lag behind 9.x.

  • states reads every N-th order's state; compare compares two such files (of orders, or of views), numbers by value, and exits with 3 when one differs. It leaves out, on both sides, the instances either file lists as stale (views states on 9.x), and counts them.

  • access reads a tenant's orders under the access policy, once the access walk has stamped them: a caller of the region most of them are tagged with reads every N-th order's state, and its streams, when it is of that region, and neither otherwise; and no stream of another order is among the events it finds.

Each command prints one JSON line of its numbers, which rehearse.sh copies into the report.

Constructors

Link copied to clipboard
constructor(args: List<String>)

Functions

Link copied to clipboard
fun run(): Int