From 522d7e88ef611de8edde6ae49cb985da58b8963c Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Thu, 28 Mar 2019 23:13:56 +0100 Subject: ocaml benchmark --- test/monniaux/ocaml/byterun/main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/monniaux/ocaml/byterun/main.c') diff --git a/test/monniaux/ocaml/byterun/main.c b/test/monniaux/ocaml/byterun/main.c index 5e5839ff..498f3d18 100644 --- a/test/monniaux/ocaml/byterun/main.c +++ b/test/monniaux/ocaml/byterun/main.c @@ -13,6 +13,7 @@ /* */ /**************************************************************************/ +#define VERIMAG_MEASUREMENTS #define CAML_INTERNALS /* Main entry point (can be overridden by a user-provided main() @@ -26,6 +27,10 @@ #include #endif +#ifdef VERIMAG_MEASUREMENTS +#include "../../clock.h" +#endif + CAMLextern void caml_main (char_os **); #ifdef _WIN32 @@ -41,7 +46,15 @@ int main(int argc, char **argv) caml_expand_command_line(&argc, &argv); #endif +#ifdef VERIMAG_MEASUREMENTS + clock_prepare(); + clock_start(); +#endif caml_main(argv); +#ifdef VERIMAG_MEASUREMENTS + clock_stop(); + print_total_clock(); +#endif caml_sys_exit(Val_int(0)); return 0; /* not reached */ } -- cgit