Increase precision for display of SmPL script execution durations
Hello,
The Coccinelle software can display profiling results for the execution of SmPL scripts. The measured durations are formatted in a way so that the information ?0.000 sec? is presented for some functions so far. I guess that these data processing efforts were performed with a non-zero time value.
How do you think about to show this detail precisely?
Regards,
Markus
Quoted 8 lines · SF Markus Elfring
Hello,
The Coccinelle software can display profiling results for the execution of SmPL scripts. The measured durations are formatted in a way so that the information ?0.000 sec? is presented for some functions so far. I guess that these data processing efforts were performed with a non-zero time value.
How do you think about to show this detail precisely?
Normally, one uses --profile to find the things that take seconds, not to find the thing that take less than 0.01 seconds.
julia
Quoted 8 lines
Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci at systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 16 lines · SF Markus Elfring
Quoted 4 lines
Quoted 1 line
How do you think about to show this detail precisely?
Normally, one uses --profile to find the things that take seconds, not to find the thing that take less than 0.01 seconds.
These values might look negligible.
I find the display of the information ?0.000 sec? inappropriate.
https://github.com/coccinelle/coccinelle/blob/445c214e755dc74fae1d205d686365767ee64e85/commons/common.ml#L648An adjustment (of a format string) could be so simple like the following.
commons/common.ml +0
-0
commons/common.ml let profile_diagnostic () = · line 660
Quoted 5 lines
commons/common.ml +1
-1@@ -657,7 +657,7 @@ let profile_diagnostic () = pr "profiling result"; pr "---------------------"; xs +> List.iter (fun (k, (t,n)) -> - pr (Printf.sprintf "%-40s : %10.3f sec %10d count" k !t !n) + pr (Printf.sprintf "%-40s : %f sec %10d count" k !t !n)
I know that the change is simple. But I don't want to see so many digits, most of which are meaningless. In 46.742592, I'm only interested in the 46.
julia
Quoted 7 lines
commons/common.ml +0
-0) )Regards,
Markus