package codex

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Stats.StatLoggerSource

Save stats between mutliple codex runs. Each logger saves a mapping string -> stat between various runs.

THE LOGGER MUST BE INSTANCIATED BEFORE THE STARTUP HOOK IS EXECUTED, an failwith will be triggered if that is not the case.

Parameters

module S : sig ... end

Signature

Sourceval add : string -> S.stat -> unit

add key stat Add a stat with the given key. If a stat is already present for this key, they are merged with S.combine key old_stat stat

Sourceval get : string -> S.stat option

Get the stat value for the key, None if the key is undefined.

Sourceval to_list : unit -> (string * S.stat) list

Return a list of all defined keys and their associated value