module BasicMetrics: sig
.. end
Defining base metrics and operations on those
Record type to compute cyclomatic complexity
type
t = {
|
cfile_name : string ; |
|
cfunc_name : string ; |
|
cslocs : int ; |
|
cifs : int ; |
|
cloops : int ; |
|
ccalls : int ; |
|
cgotos : int ; |
|
cassigns : int ; |
|
cexits : int ; |
|
cfuncs : int ; |
|
cptrs : int ; |
|
cdecision_points : int ; |
|
cglob_vars : int ; |
}
Simple type of metrics.
val empty_metrics : t
Initial empty values for metrics computing.
val apply_then_set : ('a -> 'a) -> 'a Pervasives.ref -> unit
Update a reference from a pure functional function.
Used in particular in combination with helper functions above.
val incr_slocs : t -> t
val incr_assigns : t -> t
val incr_calls : t -> t
val incr_exits : t -> t
val incr_funcs : t -> t
Helpers for metrics purposes for single increment steps
val incr_gotos : t -> t
val incr_ifs : t -> t
val incr_loops : t -> t
val incr_ptrs : t -> t
val incr_dpoints : t -> t
val incr_glob_vars : t -> t
val cyclo : t -> int
Compute cyclomatic complexity from base_metrics record type.
val labels : string list
val str_values : t -> string list
val to_list : t -> string list list
Matrix-like representation of the record in "Title: value" stytle
val pp_base_metrics : Format.formatter -> t -> unit
Pretty printers for base metrics as text or html.
val pp_strg : Format.formatter -> string -> unit
val pp_int : Format.formatter -> int -> unit
type
cell_type =
| |
Classic |
| |
Entry |
| |
Result |
val cell_type_to_string : cell_type -> string
val pp_cell_type_html : Format.formatter -> cell_type -> unit
val pp_cell : cell_type ->
(Format.formatter -> 'a -> unit) -> Format.formatter -> 'a -> unit
val pp_cell_default : (Format.formatter -> int -> unit) -> Format.formatter -> int -> unit
val pp_base_metrics_as_html_row : Format.formatter -> t -> unit