Module Monitor_sig.Monitor.Tag

module Tag: sig .. end

A module that allows to create tags and mark values. It calculates tags' cardinal and size in memory.


type t 

The abstract type for a tag.

val create : ?size:bool ->
?count:bool ->
?fct_size:(WeakHash.t -> Stdlib.Int64.t) ->
?period:int -> string -> t

create s creates a tag called s.

size : Chooses whether the tag will handle the size of its values
count : Chooses whether the tag will handle the number of its values
fct_size : Puts your own function to calculate the size
period : Sets the period to which the size and/or the count will be calculated (in milliseconds). Default is 100ms.
val kill : t -> unit

kill t kills a tag t. This means that this tag won't be monitored anymore. This may improve considerably the program's speed.

val set_period : t -> int -> unit

set_period t p changes the period to which the operations on the tag t are made.

val mark : t -> 'a -> 'a

mark t v marks any value v of type 'a with the tag t. One tag can mark many values. One value can be marked by many tags. A tag may contain any value of any type.