Liking cljdoc? Tell your friends :D

jepsen.checker

Validates that a history is correct with respect to some model.

Validates that a history is correct with respect to some model.
raw docstring

check-safeclj

(check-safe checker test model history)
(check-safe checker test model history opts)

Like check, but wraps exceptions up and returns them as a map like

{:valid? :unknown :error "..."}

Like check, but wraps exceptions up and returns them as a map like

{:valid? :unknown :error "..."}
raw docstring

Checkercljprotocol

checkclj

(check checker test model history opts)

Verify the history is correct. Returns a map like

{:valid? true}

or

{:valid? false :some-details ... :failed-at [details of specific operations]}

Opts is a map of options controlling checker execution. Keys include:

:subdirectory - A directory within this test's store directory where output files should be written. Defaults to nil.

Verify the history is correct. Returns a map like

{:valid? true}

or

{:valid?       false
 :some-details ...
 :failed-at    [details of specific operations]}

Opts is a map of options controlling checker execution. Keys include:

:subdirectory - A directory within this test's store directory where
                output files should be written. Defaults to nil.

composeclj

(compose checker-map)

Takes a map of names to checkers, and returns a checker which runs each check (possibly in parallel) and returns a map of names to results; plus a top-level :valid? key which is true iff every checker considered the history valid.

Takes a map of names to checkers, and returns a checker which runs each
check (possibly in parallel) and returns a map of names to results; plus a
top-level :valid? key which is true iff every checker considered the history
valid.
raw docstring

concurrency-limitclj

(concurrency-limit limit checker)

Takes positive integer limit and a checker. Puts an upper bound on the number of concurrent executions of this checker. Use this when a checker is particularly thread or memory intensive, to reduce context switching and memory cost.

Takes positive integer limit and a checker. Puts an upper bound on the
number of concurrent executions of this checker. Use this when a checker is
particularly thread or memory intensive, to reduce context switching and
memory cost.
raw docstring

counterclj

(counter)

A counter starts at zero; add operations should increment it by that much, and reads should return the present value. This checker validates that at each read, the value is at greater than the sum of all :ok increments, and lower than the sum of all attempted increments.

Note that this counter verifier assumes the value monotonically increases. If you want to increment by negative amounts, you'll have to recalculate and possibly widen the intervals for all pending reads with each invoke/ok write.

Returns a map:

{:valid? Whether the counter remained within bounds :reads [[lower-bound read-value upper-bound] ...] :errors [[lower-bound read-value upper-bound] ...] :max-absolute-error The [lower read upper] where read falls furthest outside :max-relative-error Same, but with error computed as a fraction of the mean}

A counter starts at zero; add operations should increment it by that much,
and reads should return the present value. This checker validates that at
each read, the value is at greater than the sum of all :ok increments, and
lower than the sum of all attempted increments.

Note that this counter verifier assumes the value monotonically increases. If
you want to increment by negative amounts, you'll have to recalculate and
possibly widen the intervals for all pending reads with each invoke/ok write.

Returns a map:

{:valid?              Whether the counter remained within bounds
 :reads               [[lower-bound read-value upper-bound] ...]
 :errors              [[lower-bound read-value upper-bound] ...]
 :max-absolute-error  The [lower read upper] where read falls furthest outside
 :max-relative-error  Same, but with error computed as a fraction of the mean}
raw docstring

expand-queue-drain-opsclj

(expand-queue-drain-ops history)

Takes a history. Looks for :drain operations with their value being a collection of queue elements, and expands them to a sequence of :dequeue invoke/complete pairs.

Takes a history. Looks for :drain operations with their value being a
collection of queue elements, and expands them to a sequence of :dequeue
invoke/complete pairs.
raw docstring

latency-graphclj

(latency-graph)

Spits out graphs of latencies.

Spits out graphs of latencies.
raw docstring

linearizableclj

(linearizable)
(linearizable algorithm)

Validates linearizability with Knossos. Defaults to the competition checker, but can be controlled by passing either :linear or :wgl.

Validates linearizability with Knossos. Defaults to the competition checker,
but can be controlled by passing either :linear or :wgl.
raw docstring

merge-validclj

(merge-valid valids)

Merge n :valid values, yielding the one with the highest priority.

Merge n :valid values, yielding the one with the highest priority.
raw docstring

perfclj

(perf)

Assorted performance statistics

Assorted performance statistics
raw docstring

queueclj

(queue)

Every dequeue must come from somewhere. Validates queue operations by assuming every non-failing enqueue succeeded, and only OK dequeues succeeded, then reducing the model with that history. Every subhistory of every queue should obey this property. Should probably be used with an unordered queue model, because we don't look for alternate orderings. O(n).

Every dequeue must come from somewhere. Validates queue operations by
assuming every non-failing enqueue succeeded, and only OK dequeues succeeded,
then reducing the model with that history. Every subhistory of every queue
should obey this property. Should probably be used with an unordered queue
model, because we don't look for alternate orderings. O(n).
raw docstring

rate-graphclj

(rate-graph)

Spits out graphs of throughput over time.

Spits out graphs of throughput over time.
raw docstring

setclj

(set)

Given a set of :add operations followed by a final :read, verifies that every successfully added element is present in the read, and that the read contains only elements for which an add was attempted.

Given a set of :add operations followed by a final :read, verifies that
every successfully added element is present in the read, and that the read
contains only elements for which an add was attempted.
raw docstring

total-queueclj

(total-queue)

What goes in must come out. Verifies that every successful enqueue has a successful dequeue. Queues only obey this property if the history includes draining them completely. O(n).

What goes in *must* come out. Verifies that every successful enqueue has a
successful dequeue. Queues only obey this property if the history includes
draining them completely. O(n).
raw docstring

unbridled-optimismclj

(unbridled-optimism)

Everything is awesoooommmmme!

Everything is awesoooommmmme!
raw docstring

unique-idsclj

(unique-ids)

Checks that a unique id generator actually emits unique IDs. Expects a history with :f :generate invocations matched by :ok responses with distinct IDs for their :values. IDs should be comparable. Returns

{:valid?              Were all IDs unique?
 :attempted-count     Number of attempted ID generation calls
 :acknowledged-count  Number of IDs actually returned successfully
 :duplicated-count    Number of IDs which were not distinct
 :duplicated          A map of some duplicate IDs to the number of times
                      they appeared--not complete for perf reasons :D
 :range               [lowest-id highest-id]}
Checks that a unique id generator actually emits unique IDs. Expects a
history with :f :generate invocations matched by :ok responses with distinct
IDs for their :values. IDs should be comparable. Returns

    {:valid?              Were all IDs unique?
     :attempted-count     Number of attempted ID generation calls
     :acknowledged-count  Number of IDs actually returned successfully
     :duplicated-count    Number of IDs which were not distinct
     :duplicated          A map of some duplicate IDs to the number of times
                          they appeared--not complete for perf reasons :D
     :range               [lowest-id highest-id]}
raw docstring

valid-prioritiesclj

A map of :valid? values to their importance. Larger numbers are considered more signficant and dominate when checkers are composed.

A map of :valid? values to their importance. Larger numbers are considered
more signficant and dominate when checkers are composed.
raw docstring

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

× close