Liking cljdoc? Tell your friends :D
Clojure only.

lite.workload.counter

The :counter workload: increment a counter and read it back.

Deliberately the weak one. The checker only verifies each read falls between the sum of acknowledged increments and the sum of attempted ones, so it catches gross errors -- lost or duplicated increments -- and proves little else.

Handler contract

:add value is a positive integer -> increment the counter by it :read value is nil -> return the counter's current value

Reads must return an integer, and the counter only ever goes up.

The `:counter` workload: increment a counter and read it back.

Deliberately the weak one. The checker only verifies each read falls between
the sum of acknowledged increments and the sum of attempted ones, so it
catches gross errors -- lost or duplicated increments -- and proves little
else.

## Handler contract

  :add   value is a positive integer -> increment the counter by it
  :read  value is nil                -> return the counter's current value

Reads must return an integer, and the counter only ever goes up.
raw docstring

addclj

(add _test _ctx)
source

rclj

(r _test _ctx)
source

workloadclj

(workload {:keys [op-limit] :or {op-limit 200}})

Options:

:op-limit Total ops (default 200), or false for as many as the run has time for.

Options:

:op-limit  Total ops (default 200), or false for as many as the run has
           time for.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close