Skip to content
Snippets Groups Projects
Commit a59bfd0d authored by Valentin Perrelle's avatar Valentin Perrelle Committed by David Bühler
Browse files

[Eva] Add an option to dump statistics into a CSV file

parent a7e60edd
No related branches found
No related tags found
No related merge requests found
......@@ -1091,6 +1091,18 @@ module NumerorsLogFile =
function in the given file"
end)
let () = Parameter_customize.set_group messages
module StatisticsFile =
Filepath
(struct
let option_name = "-eva-statistics-file"
let arg_name = "file.csv"
let file_kind = "CSV"
let existence = Fc_Filepath.Indifferent
let help = "Dump some internal statistics about the analysis"
end)
(* ------------------------------------------------------------------------- *)
(* --- Interpreter mode --- *)
(* ------------------------------------------------------------------------- *)
......
......@@ -125,6 +125,7 @@ module ShowSlevel: Parameter_sig.Int
module PrintCallstacks: Parameter_sig.Bool
module ReportRedStatuses: Parameter_sig.Filepath
module NumerorsLogFile: Parameter_sig.Filepath
module StatisticsFile: Parameter_sig.Filepath
module MemExecAll: Parameter_sig.Bool
......
......@@ -179,7 +179,7 @@ let export_as_csv_to_channel out_channel =
List.iter (pp_stat fmt) l
let export_as_csv ?filename () =
let filename = (filename : Filepath.Normalized.t option :> string option) in
let filename = Option.value ~default:"stats.json" filename in
let default = Parameters.StatisticsFile.get () in
let filename = Option.value ~default filename in
let out_channel = open_out (filename :> string) in
export_as_csv_to_channel out_channel
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment