Skip to contentSkip to conversation

buildstats.sh: add ELAPSED option

PATCH In review [email protected] 2 participants 2 messages Jun 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 buildstats.sh: add ELAPSED option

From: Ming Liu <[email protected]>

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

---
 scripts/contrib/bb-perf/buildstats.sh | 4 ++++
 1 file changed, 4 insertions(+)
scripts/contrib/bb-perf/buildstats.sh +4 -0
index 8d7e248..caf34a6 100755
@@ -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}"
 		;;
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · On Tue, 2017-06-06 at 05:20 +0200, [email protected] wrote:

From: Ming Liu <[email protected]>

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

---
 scripts/contrib/bb-perf/buildstats.sh | 4 ++++
 1 file changed, 4 insertions(+)
scripts/contrib/bb-perf/buildstats.sh +0 -0
index 8d7e248..caf34a6 100755

scripts/contrib/bb-perf/buildstats.sh line 43

Quoted 4 lines
scripts/contrib/bb-perf/buildstats.sh +1 -0
@@ -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

Quoted 16 lines
scripts/contrib/bb-perf/buildstats.sh +3 -0
 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}"
 		;;
Signature · 1 line
2.7.4