jepsen.faketime

Libfaketime is useful for making clocks run at differing rates! This namespace provides utilities for stubbing out programs with faketime.

install-0.9.6-jepsen1!

(install-0.9.6-jepsen1!)

Installs our fork of 0.9.6 (the last version which worked with jemalloc), which includes a patch to support CLOCK_MONOTONIC_COARSE and CLOCK_REALTIME_COARSE. Gosh, this is SUCH a hack.

rand-factor

(rand-factor factor)

Helpful for choosing faketime rates. Takes a factor (e.g. 2.5) and produces a random number selected from a distribution around 1, with minimum and maximum constrained such that factor * min = max. Intuitively, the fastest clock can be no more than twice as fast as the slowest.

script

(script cmd init-offset rate)

A sh script which invokes cmd with a faketime wrapper. Takes an initial offset in seconds, and a clock rate to run at.

unwrap!

(unwrap! cmd)

If a wrapper is installed, remove it and replace it with the original .nofaketime version of the binary.

wrap!

(wrap! cmd init-offset rate)

Replaces an executable with a faketime wrapper, moving the original to x.no-faketime. Idempotent.