Liking cljdoc? Tell your friends :D

jepsen.tests.bank

Helper functions for doing bank tests, where you simulate transfers between accounts, and verify that reads always show the same balance. The test map should have these additional options:

:accounts A collection of account identifiers. :total-amount Total amount to allocate. :max-transfer The largest transfer we'll try to execute.

Helper functions for doing bank tests, where you simulate transfers between
accounts, and verify that reads always show the same balance. The test map
should have these additional options:

:accounts     A collection of account identifiers.
:total-amount Total amount to allocate.
:max-transfer The largest transfer we'll try to execute.
raw docstring

by-nodeclj

(by-node test history)

Groups operations by node.

Groups operations by node.
raw docstring

check-opclj

(check-op accts total negative-balances? op)

Takes a single op and returns errors in its balance

Takes a single op and returns errors in its balance
raw docstring

checkerclj

(checker checker-opts)

Verifies that all reads must sum to (:total test), and, unless :negative-balances? is true, checks that all balances are non-negative.

Verifies that all reads must sum to (:total test), and, unless
:negative-balances? is true, checks that all balances are
non-negative.
raw docstring

diff-transferclj

Transfers only between different accounts.

Transfers only between different accounts.
raw docstring

err-badnessclj

(err-badness test err)

Takes a bank error and returns a number, depending on its type. Bigger numbers mean more egregious errors.

Takes a bank error and returns a number, depending on its type. Bigger
numbers mean more egregious errors.
raw docstring

generatorclj

(generator)

A mixture of reads and transfers for clients.

A mixture of reads and transfers for clients.
raw docstring

ok-readsclj

(ok-reads history)

Filters a history to just OK reads

Filters a history to just OK reads
raw docstring

plotterclj

(plotter)

Renders a graph of balances over time

Renders a graph of balances over time
raw docstring

pointsclj

(points history)

Turns a history into a seqeunce of [time total-of-accounts] points.

Turns a history into a seqeunce of [time total-of-accounts] points.
raw docstring

readclj

(read _ _)

A generator of read operations.

A generator of read operations.
raw docstring

testclj

(test)
(test opts)

A partial test; bundles together some default choices for keys and amounts with a generator and checker. Options:

:negative-balances? if true, doesn't verify that balances remain positive

A partial test; bundles together some default choices for keys and amounts
with a generator and checker. Options:

:negative-balances?   if true, doesn't verify that balances remain positive
raw docstring

transferclj

(transfer test process)

Generator of a transfer: a random amount between two randomly selected accounts.

Generator of a transfer: a random amount between two randomly selected
accounts.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close