let banner _ pname =
name := pname;
- "(Array.make "^string_of_int max_profilers^" (0,0.)),
- (Array.make "^string_of_int max_profilers^" (0.))"
+ "(Array.make "^string_of_int max_profilers^" (0,0.)), "^
+ "(Array.make "^string_of_int max_profilers^" (0.))"
;;
let ensure_label_in_table label =
let stop label extra =
ensure_label_in_table label;
let id = Hashtbl.find profiler_label2int label in
- "(let __res = " ^ extra ^ " in (
- let interval =
- Unix.gettimeofday () -. (snd "^ !name^").("^string_of_int id^")
- in
- let oldcount,oldval = (fst "^ !name^").("^string_of_int id^") in
- (fst "^ !name^").("^string_of_int id^") <- (oldcount+1,interval +. oldval)
- ); __res )"
+ "(let __res = " ^ extra ^ " in ( "^
+ "let interval = Unix.gettimeofday () -. "^
+ "(snd "^ !name^").("^string_of_int id^") in "^
+ "let oldcount,oldval = (fst "^ !name^").("^string_of_int id^") in "^
+ "(fst "^ !name^").("^string_of_int id^") <- "^
+ "(oldcount+1,interval +. oldval)); __res )"
;;
let profile_start_stop _ label =