diff --git a/src/plugins/eva/parameters.ml b/src/plugins/eva/parameters.ml index a8a1b273ecc4111d11114502ac711dbd8902ef92..dca2f98df5726fbd57b4aacb43f2e598e21ace42 100644 --- a/src/plugins/eva/parameters.ml +++ b/src/plugins/eva/parameters.ml @@ -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 --- *) (* ------------------------------------------------------------------------- *) diff --git a/src/plugins/eva/parameters.mli b/src/plugins/eva/parameters.mli index 4d8288faaa60f03efafc777f3859fa4e41fea8f5..61daa88642517dc801a2a65b73d7b82e80ce6210 100644 --- a/src/plugins/eva/parameters.mli +++ b/src/plugins/eva/parameters.mli @@ -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 diff --git a/src/plugins/eva/utils/statistics.ml b/src/plugins/eva/utils/statistics.ml index 2e50689661ff4ff5b2481c1882d3a1e998095c0d..139a18bf19460f88ee4304bc925b2e573f242e59 100644 --- a/src/plugins/eva/utils/statistics.ml +++ b/src/plugins/eva/utils/statistics.ml @@ -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