diff --git a/french_law/ocaml/bench.ml b/french_law/ocaml/bench.ml index 94ea9d4b..ec0d7916 100644 --- a/french_law/ocaml/bench.ml +++ b/french_law/ocaml/bench.ml @@ -224,6 +224,16 @@ let run_test_aides_logement () = exit (-1) | Runtime.AssertionFailed _ -> () +let _test = + let _ = run_test_aides_logement () in + let raw_events = Runtime.retrieve_log () in + Runtime.EventParser.parse_raw_events raw_events + +let _test = + let _ = run_test_allocations_familiales () in + let raw_events = Runtime.retrieve_log () in + Runtime.EventParser.parse_raw_events raw_events + let _bench = Random.init (int_of_float (Unix.time ())); let num_iter = 10000 in diff --git a/french_law/ocaml/dune b/french_law/ocaml/dune index 61490134..9c5a8a08 100644 --- a/french_law/ocaml/dune +++ b/french_law/ocaml/dune @@ -25,3 +25,8 @@ "A collection of functions for computing French taxes and benefits derived from Catala programs") (libraries catala.runtime_ocaml law_source) (modules api)) + +(rule + (alias runtest) + (action + (run ./bench.exe)))