Module Metric

module Metric: sig .. end
Facility to count events/measure performances.

Metrics for counting events, and generating realtime or final reports. Events may have a start and stop time or be atomic (no duration). In case of event with duration, two events are added: one for start and one for stop, so that it's possible to have the rate(t) of starts and rate(t) of stops.

These reports must provide:

(note: "current" values can be obtained from a polling agent from the bare counters offered here)

Also, each event is given a name and is known to the module so that we can build reports including all events without requiring much from the user.

Also, events of the same kind may be grouped together to form a compound event of this same type. Events are thus ordered in a tree. This need not to be performed until creation of the report, though.


val debug : bool
module Atomic: sig .. end
module Counter: sig .. end
module Timed: sig .. end
val print_report : unit BatIO.output -> unit
val report_thread : unit BatIO.output -> float -> Thread.t
type item = 
| Atomic of Atomic.t
| Counter of Counter.t
| Timed of Timed.t
| Tree of string * tree
type tree = item list 
val tree : unit -> tree