slightly better printing in CCbench

This commit is contained in:
Simon Cruanes 2014-11-13 20:32:59 +01:00
parent ece324f4c2
commit 8d875994f5

View file

@ -171,7 +171,7 @@ let prefix path t = List.fold_right (fun s t -> s >:: t) path t
(* run one atomic single_bench *) (* run one atomic single_bench *)
let run_single_bench_ fmt path f = let run_single_bench_ fmt path f =
print_line_ fmt (); print_line_ fmt ();
Format.fprintf fmt "run single_bench %a@." print_path (List.rev path); Format.fprintf fmt "run bench %a@." print_path (List.rev path);
let res = f () in let res = f () in
Benchmark.tabulate res Benchmark.tabulate res
@ -186,7 +186,7 @@ let rec run_all fmt path t = match t with
run_all fmt path t' run_all fmt path t'
) m ) m
| WithInt l -> | WithInt l ->
List.iter (fun (f, n) -> run_all fmt path (f n)) l List.iter (fun (f, n) -> run_all fmt (string_of_int n::path) (f n)) l
let run fmt t = run_all fmt [] t let run fmt t = run_all fmt [] t
@ -209,7 +209,7 @@ let rec run_path_rec_ fmt path remaining t = match t, remaining with
failwith msg failwith msg
end end
| WithInt l, _ -> | WithInt l, _ ->
List.iter (fun (f, n) -> run_path_rec_ fmt path remaining (f n)) l List.iter (fun (f, n) -> run_path_rec_ fmt (string_of_int n::path) remaining (f n)) l
| Bench _, _::_ -> () | Bench _, _::_ -> ()
let run_path fmt t path = run_path_rec_ fmt [] path t let run_path fmt t path = run_path_rec_ fmt [] path t