Skip to main content

Module clock

Module clock 

Source
Expand description

Virtual time, and the measured durations it plays back.

Every duration in Timings was measured against the live UpCloud account or against a KVM guest of the same image. At speed = 1.0 the mock waits exactly as long as the provider does, which is the mode to use when the thing under test is a TIMEOUT. At speed = 0.0 nothing waits and the clock jumps, which is the mode the 100 000-run storm uses — the ORDER of the states and their RELATIVE lengths are unchanged, so a client that skips its poll loop still fails, it just fails in microseconds.

The clock is virtual rather than “sleep less” because a shortened sleep still sleeps: 100 000 server creates at one millisecond each is a hundred seconds of doing nothing, per resource, and there are five per run. A monotonically advanced counter costs nothing and is exactly as ordered.

Structs§

Clock
Virtual milliseconds since the mock started.
Timings
The measured durations. Milliseconds, because the guest install was measured at 10 011 ms and rounding it to 10 s throws away the only digit that says it was measured.