public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] buildstats.sh: add ELAPSED option
@ 2017-06-06  3:20 liu.ming50
  2017-06-06 14:20 ` Leonardo Sandoval
  0 siblings, 1 reply; 2+ messages in thread
From: liu.ming50 @ 2017-06-06  3:20 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

This allows users to be able to get the elapsed time of specific
tasks from buildstats, sometimes could be useful.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 scripts/contrib/bb-perf/buildstats.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/contrib/bb-perf/buildstats.sh b/scripts/contrib/bb-perf/buildstats.sh
index 8d7e248..caf34a6 100755
--- a/scripts/contrib/bb-perf/buildstats.sh
+++ b/scripts/contrib/bb-perf/buildstats.sh
@@ -40,6 +40,7 @@
 
 # Stats, by type
 TIME="utime:stime:cutime:cstime"
+ELAPSED="Started:Ended:Elapsed time"
 IO="IO wchar:IO write_bytes:IO syscr:IO read_bytes:IO rchar:IO syscw:IO cancelled_write_bytes"
 RUSAGE="rusage ru_utime:rusage ru_stime:rusage ru_maxrss:rusage ru_minflt:rusage ru_majflt:\
 rusage ru_inblock:rusage ru_oublock:rusage ru_nvcsw:rusage ru_nivcsw"
@@ -113,6 +114,9 @@ for stat in ${STATS}; do
 	    TIME)
 		stats="${stats}:${TIME}"
 		;;
+	    ELAPSED)
+		stats="${stats}:${ELAPSED}"
+		;;
 	    IO)
 		stats="${stats}:${IO}"
 		;;
-- 
2.7.4



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

* Re: [PATCH] buildstats.sh: add ELAPSED option
  2017-06-06  3:20 [PATCH] buildstats.sh: add ELAPSED option liu.ming50
@ 2017-06-06 14:20 ` Leonardo Sandoval
  0 siblings, 0 replies; 2+ messages in thread
From: Leonardo Sandoval @ 2017-06-06 14:20 UTC (permalink / raw)
  To: liu.ming50; +Cc: Ming Liu, openembedded-core

On Tue, 2017-06-06 at 05:20 +0200, liu.ming50@gmail.com wrote:
> From: Ming Liu <peter.x.liu@external.atlascopco.com>
> 
> This allows users to be able to get the elapsed time of specific
> tasks from buildstats, sometimes could be useful.
> 
> Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
> ---
>  scripts/contrib/bb-perf/buildstats.sh | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/contrib/bb-perf/buildstats.sh b/scripts/contrib/bb-perf/buildstats.sh
> index 8d7e248..caf34a6 100755
> --- a/scripts/contrib/bb-perf/buildstats.sh
> +++ b/scripts/contrib/bb-perf/buildstats.sh
> @@ -40,6 +40,7 @@
>  
>  # Stats, by type
>  TIME="utime:stime:cutime:cstime"
> +ELAPSED="Started:Ended:Elapsed time"

This is useful, thanks. Just keep in mind that this is not wall time:
these timestamps come from the bitbake engine (not from /proc/[PID]),
which depending on the build parallelisms, times can change. 


Leo

>  IO="IO wchar:IO write_bytes:IO syscr:IO read_bytes:IO rchar:IO syscw:IO cancelled_write_bytes"
>  RUSAGE="rusage ru_utime:rusage ru_stime:rusage ru_maxrss:rusage ru_minflt:rusage ru_majflt:\
>  rusage ru_inblock:rusage ru_oublock:rusage ru_nvcsw:rusage ru_nivcsw"
> @@ -113,6 +114,9 @@ for stat in ${STATS}; do
>  	    TIME)
>  		stats="${stats}:${TIME}"
>  		;;
> +	    ELAPSED)
> +		stats="${stats}:${ELAPSED}"
> +		;;
>  	    IO)
>  		stats="${stats}:${IO}"
>  		;;
> -- 
> 2.7.4
> 




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

end of thread, other threads:[~2017-06-06 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-06  3:20 [PATCH] buildstats.sh: add ELAPSED option liu.ming50
2017-06-06 14:20 ` Leonardo Sandoval

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox