Skip to main content

Atlas Testing

dataset csv​

dataset.csv attributes​

Name and descriptionRequiredValue

batch

Maximum number of rows written per statement. Defaults to 1000.

falseint

exclude

Skip the dataset tables matching the glob patterns.

false

List of strings

include

Load only the dataset tables matching the glob patterns (orders, public.*).

false

List of strings

masks

Mask the columns that top-level mask blocks select before their values are loaded. The first mask selecting a column masks it.

false

List of object reference to mask

sampler

Load a sample of each table, taken by a top-level sampler block, instead of all its rows.

false

Object reference to sampler

src

The source of the snapshot: a directory, or an object-store URL (s3://, gs://, azblob://). Local paths are relative to the test file.

truestring

dataset rds_snapshot​

dataset.rds_snapshot attributes​

Name and descriptionRequiredValue

batch

Maximum number of rows written per statement. Defaults to 1000.

falseint

exclude

Skip the dataset tables matching the glob patterns.

false

List of strings

include

Load only the dataset tables matching the glob patterns (orders, public.*).

false

List of strings

masks

Mask the columns that top-level mask blocks select before their values are loaded. The first mask selecting a column masks it.

false

List of object reference to mask

sampler

Load a sample of each table, taken by a top-level sampler block, instead of all its rows.

false

Object reference to sampler

src

The source of the snapshot: a directory, or an object-store URL (s3://, gs://, azblob://). Local paths are relative to the test file.

truestring

dataset synthetic​

Generate the rows of the tables its table blocks name, the same rows for the same seed. Keys take distinct values, foreign keys reference generated rows, and the database fills the columns with a default, unless a column block sets their values.

dataset "synthetic" "seed" {
table "users" {
rows = 100
}
table "orders" {
rows = 1000
}
}

dataset.synthetic attributes​

Name and descriptionRequiredValue

batch

Maximum number of rows written per statement. Defaults to 1000.

falseint

seed

Selects other generated values. Defaults to 0.

falseint

dataset.synthetic blocks​

dataset.table​

Generate rows for the table, named <table> or <schema>.<table>.

dataset.table attributes​
Name and descriptionRequiredValue

rows

The number of rows to generate.

trueint

total

The number of rows the generated rows stand for, as the table holds in production. With --profile, what a command does to them is projected to it.

falseint
dataset.table blocks​

dataset.table.column​

Set the values of the column, in place of the generated values or the column default. A value is refused on a column of a foreign key of several columns, or a generated column, and the values of a key column keep the key distinct unless another of its columns can.

column "name" {
value = format("user %d", row.index)
}
column "plan" {
value = random::element(["free", "pro", "team"])
}
column "updated_at" {
value = random::time(row.created_at, "2026-01-01")
}
dataset.table.column attributes​
Name and descriptionRequiredValue

value

The value of the column, evaluated for each row with row.index, the row counted from 0, row.<column>, the value of another column of the row, and the random:: functions, which draw the same values for the same seed. A null value writes NULL.

true

Any value

dataset.table.column constraints​
ConstraintValue
Requiredfalse
Require Name (e.g., dataset.table.column "name" )true
Repeatabletrue
dataset.table constraints​
ConstraintValue
Requiredtrue
Require Name (e.g., dataset.table "name" )true
Repeatabletrue

expect profile​

Bound the metrics of what a command does to the database.

expect.profile blocks​

expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
expect.metric.db.io constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
expect.metric.db.lock.time constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
expect.metric.db.log.written constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
expect.metric.db.rows constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
expect.metric.db.statement.time constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
expect.metric.db.table.copy constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
expect.metric.db.table.scans constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
expect.metric.db.temp.files constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
expect.metric.db.temp.written constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredtrue
Repeatabletrue

mask​

The mask block masks the values of the text columns it selects before a dataset referencing it loads them, as the masks of script queries do, or groups other masks with use.

mask "email" {
columns = ["users.email"]
method = HASH
salt = var.mask_salt
}

mask "pii" {
use = [mask.email, mask.phone]
}

dataset "rds_snapshot" "prod" {
src = "s3://backups/snapshot-rds?region=us-east-1"
masks = [mask.pii]
}

mask attributes​

Name and descriptionRequiredValue

char

PARTIAL: replacement character (default *).

falsestring

columns

The columns to mask: <column>, <table>.<column> or <schema>.<table>.<column>, each part a glob. A name without a glob must match a column of the database. A glob skips the generated columns and those whose type cannot hold the masked values, such as numbers, dates or network addresses.

false

List of strings

entities

Mask the entities found in a value, each on its own, instead of the whole value, as Presidio does: CREDIT_CARD (Luhn checked), EMAIL, IBAN (mod 97 checked), IP, MAC, PHONE (international, or North American with separators), SSN (US) and URL, or ALL of them, including those later Atlas versions add. REDACT replaces an entity with <NAME> unless token is set. Not valid for REPLACE.

false

List of enum (ALL, CREDIT_CARD, EMAIL, IBAN, IP, MAC, PHONE, SSN, URL)

keep

PARTIAL: characters kept at each end (default 0).

falseint

keep_left

PARTIAL: characters kept at the start (overrides keep).

falseint

keep_right

PARTIAL: characters kept at the end (overrides keep).

falseint

match

REPLACE: regular expression matched against the value.

falsestring

method

Masking method (REDACT default).

false

enum (REDACT, PARTIAL, HASH, REPLACE)

salt

HASH: secret salt. With it the digest is a keyed HMAC-SHA256; without it a bare (unsalted) SHA256 digest, which is susceptible to dictionary attacks for low-entropy values. Stable salts yield comparable tokens; recommended for sensitive data, and required by datasets.

falsestring

token

REDACT: replacement token (default ***).

falsestring

use

The top-level masks this one groups, applied in order, e.g. [mask.email, mask.phone].

false

List of object reference to mask

with

REPLACE: replacement for the matched substring.

falsestring

mask constraints​

ConstraintValue
Requiredfalse
Require Name (e.g., mask "name" )true
Repeatabletrue
Mutually exclusive sets[use, columns], [use, method], [use, entities], [use, token], [use, keep], [use, keep_left], [use, keep_right], [use, char], [use, salt], [use, match], [use, with]
One of required sets[columns, use]

sampler composite​

Sample each table by the sampler of the first table block matching it, and load all rows of the tables none matches.

sampler "composite" "prod" {
table {
match = ["events", "clicks", "audit_*"]
use = sampler.random.large
}
table {
match = ["countries", "currencies"]
all = true
}
table {
match = ["*"]
use = sampler.head.small
}
}

sampler.composite blocks​

sampler.table​

Sample the tables matching the glob patterns, unless a table block before it matches them.

sampler.table attributes​
Name and descriptionRequiredValue

all

Set to true to load all rows of the matching tables, in place of use.

falsebool

match

The glob patterns matching the tables, as include does (orders, public.audit_*).

true

List of strings

use

The head, tail, random or filter sampler taking the sample of the matching tables.

false

Object reference to sampler

sampler.table constraints​
ConstraintValue
Requiredtrue
Require Namefalse
Repeatabletrue
Mutually exclusive sets[use, all]
One of required sets[use, all]

sampler filter​

Take the rows whose columns hold all the operators of their column blocks: eq, ne, in, lt, le, gt, ge and match, and the and, or and not blocks combining them. Numbers compare by value, the text of a decimal column included, and strings as text, which orders ISO dates and times. As in SQL, a NULL matches no operator, ne and not included. The other tables take no row of their own, only the rows the sample references, and with related, the rows referencing it.

sampler "filter" "one_customer" {
column "billing.tenants.id" {
eq = 42
}
related = true
}

sampler.filter attributes​

Name and descriptionRequiredValue

related

Also load the rows referencing the sampled ones, in the same table or another loaded one: one level down, as these rows load the rows they reference, but not the rows referencing them. The tables referencing a related sample are read whole.

falsebool

sampler.filter blocks​

sampler.column​

Match the rows whose column holds all of its operators and blocks. The label names the column with its table: <table>.<column> or <schema>.<table>.<column>.

sampler.column attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column blocks​

sampler.column.and​

Match the values holding all of its operators and blocks.

sampler.column.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and blocks​

sampler.column.and.and​

Match the values holding all of its operators and blocks.

sampler.column.and.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.not​

Match the values not holding all of its operators and blocks.

sampler.column.and.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.not blocks​

sampler.column.and.not.and​

Match the values holding all of its operators and blocks.

sampler.column.and.not.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.not.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.not.not​

Match the values not holding all of its operators and blocks.

sampler.column.and.not.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.not.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.not.or​

Match the values holding any of its operators and blocks.

sampler.column.and.not.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.not.or blocks​

sampler.column.and.not.or.and​

Match the values holding all of its operators and blocks.

sampler.column.and.not.or.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.not.or.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.not.or.not​

Match the values not holding all of its operators and blocks.

sampler.column.and.not.or.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.not.or.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.not.or.or​

Match the values holding any of its operators and blocks.

sampler.column.and.not.or.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.not.or.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.and.not.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.and.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.or​

Match the values holding any of its operators and blocks.

sampler.column.and.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.or blocks​

sampler.column.and.or.and​

Match the values holding all of its operators and blocks.

sampler.column.and.or.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.or.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.or.not​

Match the values not holding all of its operators and blocks.

sampler.column.and.or.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.or.not blocks​

sampler.column.and.or.not.and​

Match the values holding all of its operators and blocks.

sampler.column.and.or.not.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.or.not.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.or.not.not​

Match the values not holding all of its operators and blocks.

sampler.column.and.or.not.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.or.not.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.or.not.or​

Match the values holding any of its operators and blocks.

sampler.column.and.or.not.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.or.not.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.and.or.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.and.or.or​

Match the values holding any of its operators and blocks.

sampler.column.and.or.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.and.or.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.and.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not​

Match the values not holding all of its operators and blocks.

sampler.column.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not blocks​

sampler.column.not.and​

Match the values holding all of its operators and blocks.

sampler.column.not.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.and blocks​

sampler.column.not.and.and​

Match the values holding all of its operators and blocks.

sampler.column.not.and.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.and.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.and.not​

Match the values not holding all of its operators and blocks.

sampler.column.not.and.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.and.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.and.or​

Match the values holding any of its operators and blocks.

sampler.column.not.and.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.and.or blocks​

sampler.column.not.and.or.and​

Match the values holding all of its operators and blocks.

sampler.column.not.and.or.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.and.or.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.and.or.not​

Match the values not holding all of its operators and blocks.

sampler.column.not.and.or.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.and.or.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.and.or.or​

Match the values holding any of its operators and blocks.

sampler.column.not.and.or.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.and.or.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.not.and.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.not.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.not​

Match the values not holding all of its operators and blocks.

sampler.column.not.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.or​

Match the values holding any of its operators and blocks.

sampler.column.not.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.or blocks​

sampler.column.not.or.and​

Match the values holding all of its operators and blocks.

sampler.column.not.or.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.or.and blocks​

sampler.column.not.or.and.and​

Match the values holding all of its operators and blocks.

sampler.column.not.or.and.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.or.and.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.or.and.not​

Match the values not holding all of its operators and blocks.

sampler.column.not.or.and.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.or.and.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.or.and.or​

Match the values holding any of its operators and blocks.

sampler.column.not.or.and.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.or.and.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.not.or.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.or.not​

Match the values not holding all of its operators and blocks.

sampler.column.not.or.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.or.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.not.or.or​

Match the values holding any of its operators and blocks.

sampler.column.not.or.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.not.or.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.not.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or​

Match the values holding any of its operators and blocks.

sampler.column.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or blocks​

sampler.column.or.and​

Match the values holding all of its operators and blocks.

sampler.column.or.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.and blocks​

sampler.column.or.and.and​

Match the values holding all of its operators and blocks.

sampler.column.or.and.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.and.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.and.not​

Match the values not holding all of its operators and blocks.

sampler.column.or.and.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.and.not blocks​

sampler.column.or.and.not.and​

Match the values holding all of its operators and blocks.

sampler.column.or.and.not.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.and.not.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.and.not.not​

Match the values not holding all of its operators and blocks.

sampler.column.or.and.not.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.and.not.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.and.not.or​

Match the values holding any of its operators and blocks.

sampler.column.or.and.not.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.and.not.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.or.and.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.and.or​

Match the values holding any of its operators and blocks.

sampler.column.or.and.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.and.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.or.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.not​

Match the values not holding all of its operators and blocks.

sampler.column.or.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.not blocks​

sampler.column.or.not.and​

Match the values holding all of its operators and blocks.

sampler.column.or.not.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.not.and blocks​

sampler.column.or.not.and.and​

Match the values holding all of its operators and blocks.

sampler.column.or.not.and.and attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.not.and.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.not.and.not​

Match the values not holding all of its operators and blocks.

sampler.column.or.not.and.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.not.and.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.not.and.or​

Match the values holding any of its operators and blocks.

sampler.column.or.not.and.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.not.and.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.or.not.and constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.not.not​

Match the values not holding all of its operators and blocks.

sampler.column.or.not.not attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.not.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.not.or​

Match the values holding any of its operators and blocks.

sampler.column.or.not.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.not.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.or.not constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler.column.or.or​

Match the values holding any of its operators and blocks.

sampler.column.or.or attributes​
Name and descriptionRequiredValue

eq

Match the values equal to it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool

ge

Match the values greater than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

gt

Match the values greater than it.

false

A number or a string can be one of:

  1. number
  2. string

in

Match the values equal to one of the list.

false

List of values, where each can be one of:

  1. number
  2. string
  3. bool

le

Match the values less than or equal to it.

false

A number or a string can be one of:

  1. number
  2. string

lt

Match the values less than it.

false

A number or a string can be one of:

  1. number
  2. string

match

Match the text values matching it, a regular expression in the RE2 syntax.

falsestring

ne

Match the values differing from it.

false

A number, a string or a bool can be one of:

  1. number
  2. string
  3. bool
sampler.column.or.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column.or constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]
sampler.column constraints​
ConstraintValue
Requiredtrue
Require Name (e.g., sampler.column "name" )true
Repeatabletrue
One of required sets[eq, ne, in, lt, le, gt, ge, match, and, or, not]

sampler head​

Take the first rows of each table, in the snapshot order.

sampler.head attributes​

Name and descriptionRequiredValue

related

Also load the rows referencing the sampled ones, in the same table or another loaded one: one level down, as these rows load the rows they reference, but not the rows referencing them. The tables referencing a related sample are read whole.

falsebool

rows

The number of rows each table takes, or all its rows if it has fewer. The rows these reference, in the same table or another loaded one, are loaded on top, so no foreign key is left dangling.

trueint

sampler random​

Take rows drawn uniformly at random, the same ones on every run over the same snapshot, and a larger sample keeps the rows of a smaller one. The rows of each table are counted first.

sampler.random attributes​

Name and descriptionRequiredValue

related

Also load the rows referencing the sampled ones, in the same table or another loaded one: one level down, as these rows load the rows they reference, but not the rows referencing them. The tables referencing a related sample are read whole.

falsebool

rows

The number of rows each table takes, or all its rows if it has fewer. The rows these reference, in the same table or another loaded one, are loaded on top, so no foreign key is left dangling.

trueint

seed

Selects another random draw. Defaults to 0.

falseint

sampler tail​

Take the last rows of each table, in the snapshot order. The rows of each table are counted first.

sampler.tail attributes​

Name and descriptionRequiredValue

related

Also load the rows referencing the sampled ones, in the same table or another loaded one: one level down, as these rows load the rows they reference, but not the rows referencing them. The tables referencing a related sample are read whole.

falsebool

rows

The number of rows each table takes, or all its rows if it has fewer. The rows these reference, in the same table or another loaded one, are loaded on top, so no foreign key is left dangling.

trueint

test migrate​

The test "migrate" "name" block describes a migrate test case.

test "migrate" "20240613061102" {
migrate {
to = "20240613061046"
}
exec {
sql = "INSERT INTO users (name) VALUES ('Ada Lovelace')"
}
migrate {
to = "20240613061102"
}
exec {
sql = "SELECT first_name,last_name FROM users"
output = "Ada, Lovelace"
}
}

test.migrate attributes​

NameRequiredValue
skipfalsebool

test.migrate blocks​

test.assert​

The assert block executes an SQL statement and expects a single-row, single-column result with a true value.

test.assert attributes​
NameRequiredValue
error_messagefalsestring
sqltruestring
test.assert constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.catch​

The catch block executes one or more SQL statements and expects an error to occur.

test.catch attributes​
Name and descriptionRequiredValue
errorfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
sqltruestring
test.catch blocks​

test.catch.expect.profile​

Bound the metrics of what the command does to the database.

test.catch.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.catch.expect.profile blocks​

test.catch.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.catch.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.catch.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.catch.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.catch.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.catch.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.catch.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.catch.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.catch.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.catch.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.catch.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.catch.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.catch.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.catch.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.catch.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.catch.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.catch.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.catch.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.catch.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.catch.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.catch constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.cleanup​

The cleanup block registers a command to be called when the test case is completed.

cleanup {
sql = "SELECT pg_catalog.set_config('search_path', '', false)"
}
test.cleanup attributes​
NameRequiredValue
sqltruestring
test.cleanup constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.dataset​

The dataset block loads a dataset registered by a top-level dataset block into the test database, at the point of the test case it appears in.

dataset {
use = dataset.rds_snapshot.prod
}
test.dataset attributes​
NameRequiredValue
usetrue

Object reference to dataset

test.dataset constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.exec​

The exec block executes one or more SQL statements and expects all of them to succeed. If output or match is defined, the output of the SQL statement is compared to the expected value.

test.exec attributes​
Name and descriptionRequiredValue
formatfalse

enum (csv, table)

matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
sqltruestring
test.exec blocks​

test.exec.expect.profile​

Bound the metrics of what the command does to the database.

test.exec.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.exec.expect.profile blocks​

test.exec.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.exec.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.exec.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.exec.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.exec.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.exec.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.exec.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.exec.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.exec.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.exec.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.exec.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.exec.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.exec.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.exec.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.exec.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.exec.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.exec.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.exec.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.exec.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.exec.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.exec constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.external​

The external allows executing external programs to insert data or run assertions on the dev-database used by test case.

external {
program = [
"go", "run", "seed.go",
"--dev-url", testing.dev_url,
]
}
test.external attributes​
NameRequiredValue
matchfalsestring
outputfalsestring
programtrue

List of strings

working_dirfalsestring
test.external constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.log​

The log block logs a message to the test output.

test.log attributes​
NameRequiredValue
messagetruestring
test.log constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.migrate​

test.migrate attributes​
Name and descriptionRequiredValue

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
totruestring
test.migrate blocks​

test.migrate.expect.profile​

Bound the metrics of what the command does to the database.

test.migrate.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.migrate.expect.profile blocks​

test.migrate.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.migrate.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.migrate.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.migrate.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.migrate.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.migrate.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.migrate.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.migrate.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.migrate.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.migrate.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.migrate.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.migrate.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.migrate.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.migrate.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.migrate.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.migrate.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.migrate.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.migrate.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.migrate.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.migrate.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.migrate.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.migrate.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.migrate.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.migrate.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.migrate.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.migrate.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.migrate.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.migrate.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.migrate.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.migrate.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.migrate.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.migrate.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.migrate.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.migrate.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.migrate.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.migrate.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.migrate.workload​

The workload block runs the transactions and statements of a top-level workload block from warmup before the command starts to cooldown after it ends, and tells what they saw of it with the test case. The db.workload.errors, db.workload.latency, db.workload.stall and db.workload.blocked metrics of its expect blocks bound it, and those the server counts the traffic in too cannot be bound: db.rows, db.table.scans, db.log.written, db.temp.* and db.io. A command with it is measured, as one with expect blocks is.

migrate {
to = "20240613061102"
workload {
use = workload.app
warmup = "5s"
}
}
test.migrate.workload attributes​
Name and descriptionRequiredValue

cooldown

How long the transactions and statements run after the command ends. Defaults to 1s. Those still running then are given 5s more to end, and are cancelled and counted as failed if they do not.

falsestring

use

The top-level workload block to run, e.g. workload.app.

true

Object reference to workload

warmup

How long the transactions and statements run before the command, and what measures it, start: the latency of the command is told next to theirs. Defaults to 2s.

falsestring
test.migrate constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.script.exec​

test.script.exec attributes​
Name and descriptionRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
runfalsestring
varsfalsemap
test.script.exec blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]

test.script.expect.profile​

Bound the metrics of what the command does to the database.

test.script.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.script.expect.profile blocks​

test.script.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.script.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.script.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.script.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.script.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.script.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.script.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.script.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.script.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.script.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.script.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.script.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.script.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.script.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.exec constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.loop​

test.script.loop attributes​
Name and descriptionRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
runfalsestring
varsfalsemap
test.script.loop blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]

test.script.expect.profile​

Bound the metrics of what the command does to the database.

test.script.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.script.expect.profile blocks​

test.script.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.script.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.script.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.script.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.script.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.script.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.script.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.script.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.script.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.script.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.script.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.script.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.script.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.script.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.loop constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.query​

test.script.query attributes​
Name and descriptionRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
runfalsestring
varsfalsemap
test.script.query blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]

test.script.expect.profile​

Bound the metrics of what the command does to the database.

test.script.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.script.expect.profile blocks​

test.script.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.script.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.script.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.script.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.script.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.script.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.script.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.script.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.script.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.script.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.script.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.script.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.script.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.script.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.query constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test plan​

The test "plan" "name" block describes a schema plan test case.

test "plan" "20240613061102" {
schema {
url = "atlas://repo?version=20240613061046"
}
exec {
sql = "INSERT INTO users (name) VALUES ('Ada Lovelace')"
}
apply {
url = "file://name.plan.hcl"
}
exec {
sql = "SELECT first_name,last_name FROM users"
output = "Ada, Lovelace"
}
}

test.plan attributes​

NameRequiredValue
skipfalsebool

test.plan blocks​

test.apply​

test.apply attributes​
NameRequiredValue
urltruestring
test.apply constraints​
ConstraintValue
Requiredtrue
Require Namefalse

test.assert​

The assert block executes an SQL statement and expects a single-row, single-column result with a true value.

test.assert attributes​
NameRequiredValue
error_messagefalsestring
sqltruestring
test.assert constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.catch​

The catch block executes one or more SQL statements and expects an error to occur.

test.catch attributes​
NameRequiredValue
errorfalsestring
sqltruestring
test.catch constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.cleanup​

The cleanup block registers a command to be called when the test case is completed.

cleanup {
sql = "SELECT pg_catalog.set_config('search_path', '', false)"
}
test.cleanup attributes​
NameRequiredValue
sqltruestring
test.cleanup constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.dataset​

The dataset block loads a dataset registered by a top-level dataset block into the test database, at the point of the test case it appears in.

dataset {
use = dataset.rds_snapshot.prod
}
test.dataset attributes​
NameRequiredValue
usetrue

Object reference to dataset

test.dataset constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.exec​

The exec block executes one or more SQL statements and expects all of them to succeed. If output or match is defined, the output of the SQL statement is compared to the expected value.

test.exec attributes​
NameRequiredValue
formatfalse

enum (csv, table)

matchfalsestring
outputfalsestring
sqltruestring
test.exec constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.external​

The external allows executing external programs to insert data or run assertions on the dev-database used by test case.

external {
program = [
"go", "run", "seed.go",
"--dev-url", testing.dev_url,
]
}
test.external attributes​
NameRequiredValue
matchfalsestring
outputfalsestring
programtrue

List of strings

working_dirfalsestring
test.external constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.log​

The log block logs a message to the test output.

test.log attributes​
NameRequiredValue
messagetruestring
test.log constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.schema​

test.schema attributes​
NameRequiredValue
urltruestring
test.schema constraints​
ConstraintValue
Requiredtrue
Require Namefalse

test.script.exec​

test.script.exec attributes​
NameRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring
runfalsestring
varsfalsemap
test.script.exec blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]
test.script.exec constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.loop​

test.script.loop attributes​
NameRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring
runfalsestring
varsfalsemap
test.script.loop blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]
test.script.loop constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.query​

test.script.query attributes​
NameRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring
runfalsestring
varsfalsemap
test.script.query blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]
test.script.query constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test schema​

The test "schema" "name" block describes a schema test case.

test "schema" "postal" {
parallel = true
exec {
sql = "SELECT '12345'::us_postal_code"
}
catch {
sql = "SELECT 'hello'::us_postal_code"
}
}

test.schema attributes​

NameRequiredValue
parallelfalsebool
skipfalsebool

test.schema blocks​

test.assert​

The assert block executes an SQL statement and expects a single-row, single-column result with a true value.

test.assert attributes​
NameRequiredValue
error_messagefalsestring
sqltruestring
test.assert constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.catch​

The catch block executes one or more SQL statements and expects an error to occur.

test.catch attributes​
Name and descriptionRequiredValue
errorfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
sqltruestring
test.catch blocks​

test.catch.expect.profile​

Bound the metrics of what the command does to the database.

test.catch.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.catch.expect.profile blocks​

test.catch.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.catch.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.catch.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.catch.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.catch.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.catch.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.catch.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.catch.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.catch.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.catch.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.catch.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.catch.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.catch.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.catch.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.catch.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.catch.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.catch.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.catch.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.catch.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.catch.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.catch.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.catch.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.catch.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.catch.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.catch constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.cleanup​

The cleanup block registers a command to be called when the test case is completed.

cleanup {
sql = "SELECT pg_catalog.set_config('search_path', '', false)"
}
test.cleanup attributes​
NameRequiredValue
sqltruestring
test.cleanup constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.dataset​

The dataset block loads a dataset registered by a top-level dataset block into the test database, at the point of the test case it appears in.

dataset {
use = dataset.rds_snapshot.prod
}
test.dataset attributes​
NameRequiredValue
usetrue

Object reference to dataset

test.dataset constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.exec​

The exec block executes one or more SQL statements and expects all of them to succeed. If output or match is defined, the output of the SQL statement is compared to the expected value.

test.exec attributes​
Name and descriptionRequiredValue
formatfalse

enum (csv, table)

matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
sqltruestring
test.exec blocks​

test.exec.expect.profile​

Bound the metrics of what the command does to the database.

test.exec.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.exec.expect.profile blocks​

test.exec.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.exec.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.exec.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.exec.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.exec.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.exec.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.exec.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.exec.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.exec.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.exec.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.exec.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.exec.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.exec.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.exec.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.exec.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.exec.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.exec.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.exec.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.exec.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.exec.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.exec.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.exec.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.exec.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.exec.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.exec constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.external​

The external allows executing external programs to insert data or run assertions on the dev-database used by test case.

external {
program = [
"go", "run", "seed.go",
"--dev-url", testing.dev_url,
]
}
test.external attributes​
NameRequiredValue
matchfalsestring
outputfalsestring
programtrue

List of strings

working_dirfalsestring
test.external constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.log​

The log block logs a message to the test output.

test.log attributes​
NameRequiredValue
messagetruestring
test.log constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.script.exec​

test.script.exec attributes​
Name and descriptionRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
runfalsestring
varsfalsemap
test.script.exec blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]

test.script.expect.profile​

Bound the metrics of what the command does to the database.

test.script.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.script.expect.profile blocks​

test.script.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.script.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.script.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.script.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.script.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.script.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.script.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.script.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.script.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.script.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.script.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.script.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.script.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.script.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.exec constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.loop​

test.script.loop attributes​
Name and descriptionRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
runfalsestring
varsfalsemap
test.script.loop blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]

test.script.expect.profile​

Bound the metrics of what the command does to the database.

test.script.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.script.expect.profile blocks​

test.script.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.script.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.script.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.script.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.script.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.script.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.script.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.script.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.script.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.script.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.script.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.script.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.script.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.script.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.loop constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.query​

test.script.query attributes​
Name and descriptionRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring

profile

Set to true to measure the command and report it with its test case, with or without --profile, or to false not to measure it, as one that sets up the state the commands after it are measured on. A command with profile = false cannot have expect blocks.

falsebool
runfalsestring
varsfalsemap
test.script.query blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]

test.script.expect.profile​

Bound the metrics of what the command does to the database.

test.script.expect.profile attributes​
Name and descriptionRequiredValue

use

The top-level expect blocks whose metric blocks apply to the command too, e.g. [expect.profile.online].

false

List of object reference to expect

test.script.expect.profile blocks​

test.script.expect.metric.db.cpu.time​

The CPU time the server spent on the statements of the command, as measured.

test.script.expect.metric.db.cpu.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.cpu.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.io​

The bytes the statements of the command read from disk or wrote to it, as measured. Reads the cache served are not counted.

test.script.expect.metric.db.io attributes​
Name and descriptionRequiredValue

direction

Compare the bytes read (READ) or written (WRITE).

false

enum (READ, WRITE)

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.io constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.rows​

The time the rows of a table a transaction of the command wrote or locked are held, from the first of its statements that did, as an INSERT, UPDATE, DELETE, MERGE or COPY FROM of the table, or a SELECT ... FOR UPDATE of it alone, does, to the end of the transaction. A write by another session of one of those rows, or of a key one of them took, waits up to as long. It is projected as db.lock.time is. The rows written through views, triggers or foreign key actions, those a trigger skipped, and those of a statement that failed, are not told; a statement that runs others, as CALL and DO do, leaves it not verified, and so does an engine that tells none.

test.script.expect.metric.db.lock.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.lock.time​

The time a lock blocks other sessions from reading or writing a table. It is projected to the totals of the tables the statements under it work on the rows of if the profile projects it, up to the projection if the profile scales a statement too short to tell what the rows took of its time, or one over the rows of tables of more than one sample, at least the measured time if it grows with the table and is not projected, and up to the gaps between the samples that saw the lock. A lock on a partition is a lock on the tables above it too.

test.script.expect.metric.db.lock.time attributes​
Name and descriptionRequiredValue

blocks

Compare the locks that block other sessions from writing the table (WRITES), or from reading it too (READS), whatever their mode.

false

enum (READS, WRITES)

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

mode

Compare the locks of the mode, as the report or the database names it (AccessExclusiveLock or ACCESS EXCLUSIVE). An unknown mode, or one of a lock that blocks neither reads nor writes, fails the command. Set mode or blocks, not both.

falsestring

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.lock.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.log.written​

The bytes written to the write-ahead, redo or binary log while the command ran, as measured.

test.script.expect.metric.db.log.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.log.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.memory.usage​

The most memory a statement of the command held, or the session where statements tell none, apart from what every session shares, as measured.

test.script.expect.metric.db.memory.usage attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.memory.usage constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.rows​

The rows the command inserted, updated, deleted or read in a table. Writes are projected to its total if the profile projects them, and those of a partition up to its table's. Other rows, a hundredth of the rows loaded or more, of a table whose dataset counts more rows or does not tell its total, are at least as measured. The rows of a partitioned table include those of its partitions. The rows a TRUNCATE removes are not counted, as the engines count none.

test.script.expect.metric.db.rows attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

operation

Compare the rows of the operation: INSERT, UPDATE, DELETE or READ.

false

enum (INSERT, UPDATE, DELETE, READ)

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.rows constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.statement.time​

The time the statements of the command ran, as measured.

test.script.expect.metric.db.statement.time attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.statement.time constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.copy​

The size of the second copy of a table a rewrite keeps until it ends. It is projected to the total of the table if the profile projects it, at most the projected copy of the table above a partition, and at least the measured size if the total of the table is unknown.

test.script.expect.metric.db.table.copy attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.copy constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.rewrites​

The table rewrites the profile finds: all rows copied into new storage. The rewrites of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.rewrites attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.rewrites constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.table.scans​

The scans of a table the profile finds, one for each statement: of all its rows, or through an index of many more rows than the statement keeps. It is verified for a command that counts the rows its statements return, as exec does. The scans of a partitioned table include those of its partitions.

test.script.expect.metric.db.table.scans attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

table

Compare the values of the tables matching the name, or <schema>.<name> if the pattern has a dot. * and ? are wildcards (orders, public.audit_*). A partition matches as the tables above it too, and a pattern that matches no table fails the command.

falsestring
test.script.expect.metric.db.table.scans constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.files​

The temporary files written while the command ran, as db.temp.written counts their bytes.

test.script.expect.metric.db.temp.files attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint
test.script.expect.metric.db.temp.files constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.temp.written​

The bytes spilled to temporary files while the command ran, as measured: by its statements where the engine tells them apart, else by every session of the database.

test.script.expect.metric.db.temp.written attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a size, e.g. 512MB or 20GB, or 0.

false

A size or 0 can be one of:

  1. string
  2. number
test.script.expect.metric.db.temp.written constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.blocked​

The longest single wait of a run of a transaction, an exec or a query of the workload of the command behind it: on a lock it held, or one it asked for first, at once or behind a session that waited so, or for a free connection while every one of the workload waited so, as the profile of the command sampled the sessions waiting. A wait samples saw is known to the samples around them, and one shorter than two samples apart may be unseen. Where the samples saw none waiting, the longest is less than two samples apart. Where a dataset loads a sample of a table, a wait grows by what the lock it waited behind grows at the total of the tables, as db.lock.time projects it, or the rows, as db.lock.rows does, and so may a wait unseen of a run in progress as the lock was released, but one the error of its run, as a timeout, may have ended; one behind no lock the reading tells, as behind another session that waited behind the command, may grow unbounded, and so may any wait of a run that writes rows where the reading does not tell the rows the command wrote, as of an engine that tells none; a run due at the rate of the workload waits for a free connection as much longer as the runs before it may end later; the time the request of a lock the command asked for waited behind other sessions does not grow. With no run of them that ended from the start of the command on, with connections of the workload that ended, where the sampling does not read the sessions waiting, or a reason of the reading may leave them short, it is not verified.

test.script.expect.metric.db.workload.blocked attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.blocked constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.errors​

The runs of a transaction, an exec or a query of the workload of the command that failed, by a statement or by their commit, from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end: one still going after them is cancelled, and counted as failed. A run that waits for the command, as for a lock it holds, fails only if a timeout of its session ends it. With no run of them that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.errors attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it.

falseint

ge

Each value compared is at least it.

falseint

gt

Each value compared is more than it.

falseint

le

Each value compared is at most it.

falseint

lt

Each value compared is less than it.

falseint

ne

Each value compared differs from it.

falseint

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.errors constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.latency​

The latency of the runs of a transaction, an exec or a query of the workload of the command that ended from the start of the command to the end of its cooldown, or in the 5s the runs still going then are given to end, failed or not: from when each was due at the rate of the workload, or its session free with no rate, to its end, so the time a run waits for the command, or for a session one that waits holds, counts. By quantile: P50, P95 and P99, rounded up by half a percent at most, and MAX. A bound may be a multiple of the same latency of the runs that ended before the command, as 3x, which a warmup measures. With no run of them that ended then, or before the command for such a bound, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.latency attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

quantile

Compare the latency half of the runs ended within (P50), 95 or 99 in a hundred of them (P95, P99), or the longest (MAX).

false

enum (P50, P95, P99, MAX)

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.latency constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.expect.metric.db.workload.stall​

The longest time no run of the workload of the command ended without an error, from the start of the command to the end of its cooldown: what a command that blocks its transactions, or fails them, takes of the application. With a transaction, the longest time no run of that transaction did, which a run of another does not end. Where a dataset loads a sample of a table, the stall grows by what the locks its runs waited behind grow at the total, or may have unseen, and with no wait of them known it may grow unbounded. A bound may be a multiple of the longest such time before the command, as 3x, which a warmup measures. With no run that ended then, or with connections of the workload that ended, it is not verified.

test.script.expect.metric.db.workload.stall attributes​
Name and descriptionRequiredValue

eq

Each value compared equals it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

ge

Each value compared is at least it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

gt

Each value compared is more than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

le

Each value compared is at most it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

lt

Each value compared is less than it: a duration, e.g. 100ms or 5s, 0, or a multiple of the same value before the command, e.g. 3x.

false

A duration, 0 or a multiple can be one of:

  1. string
  2. number

ne

Each value compared differs from it: a duration, e.g. 100ms or 5s, or 0.

false

A duration or 0 can be one of:

  1. string
  2. number

transaction

Compare the value of the transaction or the statement of the workload the command runs, by its name. A name the workload has no transaction or statement of fails the test file.

falsestring
test.script.expect.metric.db.workload.stall constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.expect.profile constraints​
ConstraintValue
Requiredfalse
Repeatabletrue
test.script.query constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test script​

The test "script" "name" block describes a script test case. The optional schema block sets up the schema the script expects and must be defined before any other block.

test "script" "vip_backfill" {
schema {
url = "file://schema.hcl"
}
exec {
sql = "INSERT INTO users (id, vip, tier) VALUES (1, true, NULL)"
}
script "exec" {
file = "vip_backfill.script.hcl"
}
assert {
sql = "SELECT count(*) = 0 FROM users WHERE vip AND tier IS NULL"
}
}

test.script attributes​

NameRequiredValue
skipfalsebool

test.script blocks​

test.assert​

The assert block executes an SQL statement and expects a single-row, single-column result with a true value.

test.assert attributes​
NameRequiredValue
error_messagefalsestring
sqltruestring
test.assert constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.catch​

The catch block executes one or more SQL statements and expects an error to occur.

test.catch attributes​
NameRequiredValue
errorfalsestring
sqltruestring
test.catch constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.cleanup​

The cleanup block registers a command to be called when the test case is completed.

cleanup {
sql = "SELECT pg_catalog.set_config('search_path', '', false)"
}
test.cleanup attributes​
NameRequiredValue
sqltruestring
test.cleanup constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.dataset​

The dataset block loads a dataset registered by a top-level dataset block into the test database, at the point of the test case it appears in.

dataset {
use = dataset.rds_snapshot.prod
}
test.dataset attributes​
NameRequiredValue
usetrue

Object reference to dataset

test.dataset constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.exec​

The exec block executes one or more SQL statements and expects all of them to succeed. If output or match is defined, the output of the SQL statement is compared to the expected value.

test.exec attributes​
NameRequiredValue
formatfalse

enum (csv, table)

matchfalsestring
outputfalsestring
sqltruestring
test.exec constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.external​

The external allows executing external programs to insert data or run assertions on the dev-database used by test case.

external {
program = [
"go", "run", "seed.go",
"--dev-url", testing.dev_url,
]
}
test.external attributes​
NameRequiredValue
matchfalsestring
outputfalsestring
programtrue

List of strings

working_dirfalsestring
test.external constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
Mutually exclusive sets[output, match]

test.log​

The log block logs a message to the test output.

test.log attributes​
NameRequiredValue
messagetruestring
test.log constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

test.schema​

test.schema attributes​
NameRequiredValue
urltruestring

test.script.exec​

test.script.exec attributes​
NameRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring
runfalsestring
varsfalsemap
test.script.exec blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]
test.script.exec constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.loop​

test.script.loop attributes​
NameRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring
runfalsestring
varsfalsemap
test.script.loop blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]
test.script.loop constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

test.script.query​

test.script.query attributes​
NameRequiredValue
errorfalsestring
filetruestring
matchfalsestring
outputfalsestring
runfalsestring
varsfalsemap
test.script.query blocks​

test.script.as​

test.script.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
test.script.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]
test.script.query constraints​
ConstraintValue
Requiredfalse
Repeatabletrue

workload​

The workload block names the transactions and the statements an application runs, on how many connections and at what rate. A migrate command whose workload block uses it runs them, committed, from a warmup before it starts to a cooldown after it ends, and tells what they saw of it: the runs of each, those that failed, how long they took, how long they waited behind it, and the longest time none ended without an error. The db.workload.errors, db.workload.latency, db.workload.stall and db.workload.blocked metrics of its expect blocks bound them.

workload "app" {
connections = 8
rate = "200/s"
query "read_order" {
weight = 3
sql = "SELECT status, amount FROM orders WHERE id = $1"
args = [random::int(1, 100000)]
}
transaction "checkout" {
exec {
sql = "UPDATE users SET visits = visits + 1 WHERE id = $1"
args = [random::int(1, 1000)]
}
exec {
sql = "INSERT INTO orders (user_id, amount) VALUES ($1, $2)"
args = [random::int(1, 1000), random::int(100, 50000)]
}
}
}

test "migrate" "20240613061102" {
migrate {
to = "20240613061046"
}
migrate {
to = "20240613061102"
workload {
use = workload.app
}
expect "profile" {
metric "db.workload.errors" {
eq = 0
}
metric "db.workload.stall" {
le = "500ms"
}
metric "db.workload.latency" {
transaction = "checkout"
quantile = P99
le = "300ms"
}
metric "db.workload.blocked" {
le = "200ms"
}
}
}
}

workload attributes​

Name and descriptionRequiredValue

connections

The sessions the transactions and statements run on at once, as the connections of the pool of the application. Defaults to 8.

falseint

rate

The transactions and statements started a second, as 200/s, each on the first session free. One due while every session is busy waits for one, and its latency counts the wait. Without it, each session runs one after another.

falsestring

workload blocks​

workload.as​

workload.as attributes​
NameRequiredValue
passwordfalsestring
rolefalsestring
userfalsestring
workload.as constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Mutually exclusive sets[role, user]
One of required sets[role, user]

workload.exec​

A statement the workload runs on its own, as an application runs a single one: in no transaction block (autocommit), so it may be one a transaction block cannot run, as VACUUM. It is told by its name, as a transaction is.

workload.exec attributes​
Name and descriptionRequiredValue

args

The values of the parameters of the statement, in order, evaluated for each run with the random:: functions, e.g. [random::int(1, 1000), "new"].

false

Any value

sql

The statement, with its parameters as the database takes them, as $1 on PostgreSQL or ? on MySQL. The errors of one an atlas:sensitive comment marks are masked, as those of a migration file are.

truestring

weight

How often the statement runs, against the weights of the others. Defaults to 1.

falseint
workload.exec constraints​
ConstraintValue
Requiredfalse
Require Name (e.g., workload.exec "name" )true
Repeatabletrue

workload.query​

A query the workload runs on its own, in no transaction block (autocommit), and reads to its last row, as an application runs a single SELECT. It is told by its name, as a transaction is.

workload.query attributes​
Name and descriptionRequiredValue

args

The values of the parameters of the statement, in order, evaluated for each run with the random:: functions, e.g. [random::int(1, 1000), "new"].

false

Any value

sql

The statement, with its parameters as the database takes them, as $1 on PostgreSQL or ? on MySQL. The errors of one an atlas:sensitive comment marks are masked, as those of a migration file are.

truestring

weight

How often the query runs, against the weights of the others. Defaults to 1.

falseint
workload.query constraints​
ConstraintValue
Requiredfalse
Require Name (e.g., workload.query "name" )true
Repeatabletrue

workload.transaction​

A transaction of the workload: its exec and query blocks run in order, and one that fails ends it.

workload.transaction attributes​
Name and descriptionRequiredValue

weight

How often the transaction runs, against the weights of the others. Defaults to 1.

falseint
workload.transaction blocks​

workload.transaction.exec​

A statement of the transaction, run for what it does, as an INSERT.

workload.transaction.exec attributes​
Name and descriptionRequiredValue

args

The values of the parameters of the statement, in order, evaluated for each run with the random:: functions, e.g. [random::int(1, 1000), "new"].

false

Any value

sql

The statement, with its parameters as the database takes them, as $1 on PostgreSQL or ? on MySQL. The errors of one an atlas:sensitive comment marks are masked, as those of a migration file are.

truestring
workload.transaction.exec constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue

workload.transaction.query​

A statement of the transaction whose rows are read to the last, as a SELECT.

workload.transaction.query attributes​
Name and descriptionRequiredValue

args

The values of the parameters of the statement, in order, evaluated for each run with the random:: functions, e.g. [random::int(1, 1000), "new"].

false

Any value

sql

The statement, with its parameters as the database takes them, as $1 on PostgreSQL or ? on MySQL. The errors of one an atlas:sensitive comment marks are masked, as those of a migration file are.

truestring
workload.transaction.query constraints​
ConstraintValue
Requiredfalse
Require Namefalse
Repeatabletrue
workload.transaction constraints​
ConstraintValue
Requiredfalse
Require Name (e.g., workload.transaction "name" )true
Repeatabletrue
One of required sets[exec, query]

workload constraints​

ConstraintValue
Requiredfalse
Require Name (e.g., workload "name" )true
Repeatabletrue
One of required sets[transaction, exec, query]