cocci.inria.fr archive mirror
 help / color / mirror / Atom feed
* [Cocci] Increase precision for display of SmPL script execution durations
@ 2018-05-30 13:32 SF Markus Elfring
  2018-05-30 20:33 ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: SF Markus Elfring @ 2018-05-30 13:32 UTC (permalink / raw)
  To: cocci

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Cocci] Increase precision for display of SmPL script execution durations
  2018-05-30 13:32 [Cocci] Increase precision for display of SmPL script execution durations SF Markus Elfring
@ 2018-05-30 20:33 ` Julia Lawall
       [not found]   ` <c12b39fa-4403-074f-68f3-dc457608d944@users.sourceforge.net>
  0 siblings, 1 reply; 3+ messages in thread
From: Julia Lawall @ 2018-05-30 20:33 UTC (permalink / raw)
  To: cocci



On Wed, 30 May 2018, SF Markus Elfring wrote:

> 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

>
> Regards,
> Markus
> _______________________________________________
> Cocci mailing list
> Cocci at systeme.lip6.fr
> https://systeme.lip6.fr/mailman/listinfo/cocci
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Cocci] Increase precision for display of SmPL script execution durations
       [not found]   ` <c12b39fa-4403-074f-68f3-dc457608d944@users.sourceforge.net>
@ 2018-05-31  5:57     ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2018-05-31  5:57 UTC (permalink / raw)
  To: cocci



On Thu, 31 May 2018, SF Markus Elfring wrote:

> >> 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#L648
>
> An adjustment (of a format string) could be so simple like the following.
>
> diff --git a/commons/common.ml b/commons/common.ml
> index 7cbeceaf..ca5399ad 100644
> --- a/commons/common.ml
> +++ b/commons/common.ml
> @@ -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

>        )
>      )
>
>
> Regards,
> Markus
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-31  5:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-30 13:32 [Cocci] Increase precision for display of SmPL script execution durations SF Markus Elfring
2018-05-30 20:33 ` Julia Lawall
     [not found]   ` <c12b39fa-4403-074f-68f3-dc457608d944@users.sourceforge.net>
2018-05-31  5:57     ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).