ExPilot.Ledger (ExPilot v0.1.1)

Copy Markdown View Source

ExPilot's results in Cauldron2D.Ledger, kept at $XDG_DATA_HOME/expilot/ledger.dets beside the accounts, with the metrics its boards rank by: kills, kills a death, rounds won, the best streak of kills without dying, the longest contact (seconds alive with an enemy within thirty tiles) and laps.

ExPilot.Ledger.board(:week, :kills, arena: "Arena")
ExPilot.Ledger.forget("load_*")

The process is named ExPilot.Ledger and started with the application; every arena's recorder writes to it. mix ex_pilot.ledger --forget load_* forgets results from the command line, on a ledger no server holds.

Summary

Functions

The board of period by metric; arena: narrows it to one arena.

Drop every result of a name matching pattern* stands for any run of characters, as in load_* for the load tool's accounts — and say how many went.

The metrics, in the order the boards offer them, with their titles.

The metrics as Cauldron2D.Ledger is started with them.

Where the ledger lives: $XDG_DATA_HOME/expilot/ledger.dets.

A board value as text: seconds for contact, two decimals for a ratio, whole numbers otherwise.

Functions

board(period, metric, opts \\ [])

The board of period by metric; arena: narrows it to one arena.

forget(pattern)

@spec forget(String.t()) :: non_neg_integer()

Drop every result of a name matching pattern* stands for any run of characters, as in load_* for the load tool's accounts — and say how many went.

metrics()

@spec metrics() :: [{Cauldron2D.Ledger.metric(), String.t()}]

The metrics, in the order the boards offer them, with their titles.

metrics_spec()

@spec metrics_spec() :: keyword()

The metrics as Cauldron2D.Ledger is started with them.

path()

@spec path() :: Path.t()

Where the ledger lives: $XDG_DATA_HOME/expilot/ledger.dets.

value(seconds, arg2)

@spec value(number(), Cauldron2D.Ledger.metric()) :: String.t()

A board value as text: seconds for contact, two decimals for a ratio, whole numbers otherwise.