sig
type query_phase =
Parsing_Phase
| Normalization_Phase
| Rewriting_Phase
| Factorization_Phase
| Compile_Phase
| Optimization_Phase
| Selection_Phase
| Evaluation_Phase
type phase =
PQuery of Monitoring_context.query_phase
| Document_Serialization_Phase
| Document_Toplevel_ParsingLoading_Phase of string
| Document_ParsingLoading_Phase of string
| External_Phase
val increment_node_count : unit -> unit
val get_node_count : unit -> int
type call_kind = Prolog | Statement | Serialization
type stats_item = {
glx_total_memory : float;
glx_live_memory : float;
glx_time : float;
glx_node_count : int;
}
type stats_point = {
mutable relative_stats : Monitoring_context.stats_item;
mutable absolute_stats : Monitoring_context.stats_item;
}
type call_stat_summary = {
mutable call_name : string;
mutable call_kind : Monitoring_context.call_kind;
mutable current_phase : Monitoring_context.phase option;
query_toplevel_phase : Monitoring_context.stats_point;
query_parsing_phase : Monitoring_context.stats_point;
query_normalization_phase : Monitoring_context.stats_point;
query_rewriting_phase : Monitoring_context.stats_point;
query_factorization_phase : Monitoring_context.stats_point;
query_compile_phase : Monitoring_context.stats_point;
query_optimization_phase : Monitoring_context.stats_point;
query_selection_phase : Monitoring_context.stats_point;
query_evaluation_phase : Monitoring_context.stats_point;
query_serialization_phase : Monitoring_context.stats_point;
mutable document_toplevel_parsingloading_phase :
(string, Monitoring_context.stats_point) Hashtbl.t;
mutable document_parsingloading_phase :
(string, Monitoring_context.stats_point) Hashtbl.t;
external_phase : Monitoring_context.stats_point;
}
type monitor_context
val default_monitor_context : unit -> Monitoring_context.monitor_context
val set_monitor_mem : Monitoring_context.monitor_context -> bool -> unit
val set_monitor_time : Monitoring_context.monitor_context -> bool -> unit
val get_monitor_mem : Monitoring_context.monitor_context -> bool
val get_monitor_time : Monitoring_context.monitor_context -> bool
val set_monitor_output :
Monitoring_context.monitor_context -> Galax_io.output_spec -> unit
val get_monitor_output :
Monitoring_context.monitor_context -> Galax_io.output_spec
val set_current_call :
Monitoring_context.monitor_context ->
Monitoring_context.call_stat_summary option -> unit
val get_current_call :
Monitoring_context.monitor_context ->
Monitoring_context.call_stat_summary option
val push_resume_call :
Monitoring_context.monitor_context ->
Monitoring_context.call_stat_summary -> unit
val pop_resume_call :
Monitoring_context.monitor_context ->
Monitoring_context.call_stat_summary option
val add_completed_call :
Monitoring_context.monitor_context ->
Monitoring_context.call_stat_summary -> unit
val get_last_call :
Monitoring_context.monitor_context ->
Monitoring_context.call_stat_summary option
val get_all_calls :
Monitoring_context.monitor_context ->
Monitoring_context.call_stat_summary list
val string_of_call_kind : Monitoring_context.call_kind -> string
val string_of_phase : Monitoring_context.phase -> string
end