|
@@ -17,10 +17,10 @@ let htmlescape s =
|
|
let get_timer_fields start_time =
|
|
let get_timer_fields start_time =
|
|
let tot = ref 0. in
|
|
let tot = ref 0. in
|
|
Hashtbl.iter (fun _ t -> tot := !tot +. t.total) Common.htimers;
|
|
Hashtbl.iter (fun _ t -> tot := !tot +. t.total) Common.htimers;
|
|
- let fields = [("@TOTAL", FKTimer (Printf.sprintf "%.3fs" (get_time() -. start_time)), "")] in
|
|
|
|
|
|
+ let fields = [("@TOTAL", Printf.sprintf "%.3fs" (get_time() -. start_time))] in
|
|
if !tot > 0. then
|
|
if !tot > 0. then
|
|
Hashtbl.fold (fun _ t acc ->
|
|
Hashtbl.fold (fun _ t acc ->
|
|
- ("@TIME " ^ (String.concat "." t.id), FKTimer (Printf.sprintf "%.3fs (%.0f%%)" t.total (t.total *. 100. /. !tot)), "") :: acc
|
|
|
|
|
|
+ ((String.concat "." t.id),(Printf.sprintf "%.3fs (%.0f%%)" t.total (t.total *. 100. /. !tot))) :: acc
|
|
) Common.htimers fields
|
|
) Common.htimers fields
|
|
else
|
|
else
|
|
fields
|
|
fields
|
|
@@ -78,6 +78,8 @@ let print_toplevel il =
|
|
Buffer.add_string b (Printf.sprintf "<i k=\"type\" p=\"%s\"%s>%s</i>\n" (s_type_path infos.mt_path) (s_doc infos.mt_doc) (snd infos.mt_path));
|
|
Buffer.add_string b (Printf.sprintf "<i k=\"type\" p=\"%s\"%s>%s</i>\n" (s_type_path infos.mt_path) (s_doc infos.mt_doc) (snd infos.mt_path));
|
|
| IdentifierType.ITPackage s ->
|
|
| IdentifierType.ITPackage s ->
|
|
Buffer.add_string b (Printf.sprintf "<i k=\"package\">%s</i>\n" s)
|
|
Buffer.add_string b (Printf.sprintf "<i k=\"package\">%s</i>\n" s)
|
|
|
|
+ | IdentifierType.ITTimer s ->
|
|
|
|
+ Buffer.add_string b (Printf.sprintf "<i k=\"timer\">%s</i>\n" s)
|
|
) il;
|
|
) il;
|
|
Buffer.add_string b "</il>";
|
|
Buffer.add_string b "</il>";
|
|
Buffer.contents b
|
|
Buffer.contents b
|