dsnapshot.layout

Members

Functions

bestFitInterval
Nullable!size_t bestFitInterval(SysTime time, Interval!SysTime[] candidates)
bestFitTime
Nullable!size_t bestFitTime(SysTime time, SysTime[] candidates)
fitness
Duration fitness(SysTime a, SysTime b)

It is always positive. The closer to zero the better fit.

Structs

Bucket
struct Bucket
Undocumented in source.
Empty
struct Empty

Represent an empty position in the snapshot layout.

Layout
struct Layout

At construction it is configured with how the snapshots should be organized into buckets. How many and the space in time between them.

LayoutConfig
struct LayoutConfig

Configuration of a layout consisting of a number of span configs.

Name (from dsnapshot.types)
struct Name via public import dsnapshot.types : Name;

Name of an existing snapshot.

Snapshot
struct Snapshot
Undocumented in source.
Span
struct Span

Configuration for a span of snapshots in a layout.

Meta

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

# Algorithm 1. Construct the layout consisting of a number of consecutive slots with a duration between them. 2. Fill the slots with snapshots that exists using a "best fit" algorithm.

# Best fit The best fitting snapshot is the one with the lowest difference between the buckets time and the snapshots actual time.