generic-poky/scripts
Ulf Magnusson 4d2658eeee task-time: Add simple buildstats analysis script
The 'task-time' Python script is used for simple manual analysis of
buildstats. It displays task timing information in the same format (and
using the same calculation) as the Bash 'time' builtin, and can
optionally sort tasks by real (wall-clock), user (user space CPU), or
sys (kernel CPU) time used.

The timing information comes from the getrusage(2) fields added by
commit adfdca4df1 ("buildstats: Improve to add getrusage data and
corrected IO stats"). That commit is required for the script to work.

Example 1: Running 'task-time' on a specific task buildstat:

  $ task-time ./20161005235448/gettext-0.16.1-r6/do_compile
  ./20161005235448/gettext-0.16.1-r6/do_compile:
  real  0m54.560s
  user  0m46.028s
  sys   0m2.772s

Example 2: Running 'task-time' on a directory, sorting on wall-clock
time:

  $ task-time tmp/buildstats/20161018083535 --sort real
  tmp/buildstats/20161018083535/bash-4.3.30-r0/do_fetch:
  real    10m59.140s
  user    0m1.152s
  sys     0m0.320s

  tmp/buildstats/20161018083535/readline-native-6.3-r0/do_fetch:
  real    8m57.310s
  user    0m0.860s
  sys     0m0.288s

  tmp/buildstats/20161018083535/perl-5.22.1-r0/do_compile:
  real    4m28.840s
  user    4m1.348s
  sys     0m15.816s

  ...

Example 3: Running 'task-time' on all do_compile buildstats for a
particular build by using shell globbing, sorting on user space CPU
time:

  $ task-time tmp/buildstats/20161018083535/*/do_compile --sort user
  tmp/buildstats/20161018083535/qemu-native-2.7.0-r1/do_compile:
  real    0m49.570s
  user    21m45.236s
  sys     1m44.380s

  tmp/buildstats/20161018083535/linux-yocto-4.8+gitAUTOINC+03bf3dd731_67813e7efa-r0/do_compile:
  real    0m49.530s
  user    21m39.588s
  sys     1m59.576s

  tmp/buildstats/20161018083535/gcc-cross-i586-6.2.0-r0/do_compile:
  real    1m8.130s
  user    15m54.256s
  sys     1m28.776s

  ...

Example 4: Comparing a task between two builds:

  $ task-time 201610052{25856,35448}/gettext-0*/do_compile --sort real
  20161005235448/gettext-0.16.1-r6/do_compile:
  real	0m54.560s
  user	0m46.028s
  sys	0m2.772s

  20161005225856/gettext-0.19.8.1-r0/do_compile:
  real	0m41.520s
  user	2m17.312s
  sys	0m7.536s

(From OE-Core rev: 76dfad5b598e2937554bddeecf47482b14a854cd)

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-11-06 23:35:36 +00:00
..
contrib mkefidisk.sh: add deprecation warning to the output 2016-11-06 23:35:32 +00:00
lib devtool: runqemu: work around runqemu script path assumption 2016-10-25 22:40:09 +01:00
native-intercept native.bbclass: Add a simple chown intercept command 2011-06-23 21:08:01 +01:00
postinst-intercepts gio-module-cache: Add class for Gio modules 2016-03-28 15:55:49 +01:00
pybootchartgui scripts/pybootchart: Fix print statement 2016-06-03 14:38:01 +01:00
tiny scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
README Further cleanup of various poky references 2011-04-21 12:56:16 +01:00
bitbake-prserv-tool bitbake-prserv-tool: check file name 2015-11-25 07:50:30 +00:00
bitbake-whatchanged scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
buildhistory-collect-srcrevs buildhistory-collect-srcrevs: Fix multiple SRCREV definitions 2016-10-28 16:15:17 +01:00
buildhistory-diff buildhistory-diff: suggest correct version of PythonGit 2016-06-12 23:47:17 +01:00
buildstats-diff scripts/buildstats-diff: implement --multi option 2016-10-01 21:45:56 +01:00
cleanup-workdir scripts/cleanup-workdir: Adapt to SDK_ARCH -> SDK_SYS chanages for crosssdk 2016-09-28 10:16:03 +01:00
combo-layer combo-layer: handle file_exclude matching dirs 2016-10-28 16:15:21 +01:00
combo-layer-hook-default.sh combo-layer-hook-default.sh: handle patches without Signed-off-by 2015-03-20 11:21:25 +00:00
combo-layer.conf.example combo-layer: partial import for '--history init' 2015-03-20 11:21:24 +00:00
cp-noerror scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
create-pull-request create-pull-request: remove output directory 2016-09-15 12:15:07 +01:00
crosstap crosstap: handle hyphenated x86_64 target arch 2013-02-05 15:22:45 +00:00
devtool devtool: Add a line break to generated README 2016-09-28 10:16:03 +01:00
gen-lockedsig-cache gen-lockedsig-cache: ensure symlinks are dereferenced 2016-08-17 10:35:40 +01:00
gen-site-config siteconfig: generate configuration data caches for autoconf 2010-09-03 10:50:02 +01:00
lnr scripts/lnr: update for python3 2016-06-01 12:47:10 +01:00
multilib_header_wrapper.h multilib_header.bbclass: Add oe_multilib_header wrapper 2011-07-27 15:45:47 +01:00
oe-build-perf-test oe-build-perf-test: return 2 if some tests failed 2016-10-01 21:45:56 +01:00
oe-buildenv-internal oe-buildenv-internal: hint at specifying bitbake path in error message 2016-08-17 10:35:40 +01:00
oe-check-sstate devtool/recipetool/meta: Adapt to bitbake API changes for multi-configuration builds 2016-08-18 10:07:23 +01:00
oe-find-native-sysroot oe-find-native-sysroot: minor optimization 2013-08-03 10:33:12 +01:00
oe-git-proxy oe-git-proxy: don't depend on syslinux 2016-07-20 10:28:51 +01:00
oe-gnome-terminal-phonehome terminal: Fix gnome-terminal to work with recent versions 2016-07-08 10:50:18 +01:00
oe-pkgdata-util oe-pkgdata-util: Use standard verb form in help info. 2016-11-06 23:35:35 +00:00
oe-publish-sdk scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
oe-run-native scripts: Rename 'native' to 'oe-run-native' 2016-10-06 07:53:51 +01:00
oe-selftest oe-selftest: check for coverage version before starting tests 2016-09-15 12:15:07 +01:00
oe-setup-builddir oe-setup-builddir: fix TEMPLATECONF error message 2016-11-06 23:35:35 +00:00
oe-setup-rpmrepo oe-setup-rpmrepo: add native sysroot so nativepython can be found by env 2013-08-30 18:06:31 +01:00
oe-trim-schemas scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
oepydevshell-internal.py oepydevshell-internal: python3: encode/decode pty content 2016-07-08 09:57:24 +01:00
opkg-query-helper.py scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
pythondeps scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
recipetool scripts: ensure tinfoil is shut down correctly 2016-09-03 23:45:54 +01:00
relocate_sdk.py scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
rootfs_rpm-extract-postinst.awk meta/classes/rootfs_rpm.bbclass: re implement base on rpm5 2010-07-24 00:46:57 +01:00
rpm2cpio.sh rpm2cpio.sh: make compression tests case-insensitive 2012-01-03 12:14:39 +00:00
runqemu runqemu: add user mode (SLIRP) support to x86 QEMU targets 2016-11-06 23:35:35 +00:00
runqemu-addptable2image scripts/oe-setup-builddir: Fix up OE-Core/Poky mismatch for now (and fix permissions) 2011-04-21 19:19:33 +01:00
runqemu-export-rootfs runqemu-export-rootfs: update location of unfsd binary 2015-10-29 07:31:17 +00:00
runqemu-extract-sdk runqemu-extract-sdk: normalize paths to improve output 2014-07-03 17:41:16 +01:00
runqemu-gen-tapdevs runqemu-gen-tapdevs: remove /etc/runqemu-nosudo when remove taps 2016-09-20 15:11:08 +01:00
runqemu-ifdown runqemu-ifdown: clean up the remaining iptables rules 2013-08-30 16:23:47 +01:00
runqemu-ifup runqemu-ifup: Check if the tap interface is set up correctly 2015-10-27 07:24:28 +00:00
runqemu.README scripts/runqemu.README: Clean this up to accurately reflect what the runqemu command now does 2011-04-21 12:56:13 +01:00
send-error-report send-error-report: encode data to bytes 2016-06-03 13:13:30 +01:00
send-pull-request send-pull-request: add extra CC argument 2013-02-06 09:37:22 +00:00
sstate-cache-management.sh scripts/sstate-cache-management.sh: Change wording 2016-02-15 16:28:43 +00:00
sstate-diff-machines.sh sstate-diff-machines.sh: Return non-zero return code when there was some failure detected 2014-06-29 09:04:22 +01:00
sstate-sysroot-cruft.sh sstate-sysroot-cruft: Add /etc/ld.so.conf to whitelist 2016-10-28 16:15:19 +01:00
sysroot-relativelinks.py scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
task-time task-time: Add simple buildstats analysis script 2016-11-06 23:35:36 +00:00
test-dependencies.sh test-dependencies.sh: Strip also '\.bb: .*' before adding failed recipe to list of failed 2016-10-28 16:15:19 +01:00
test-reexec test-reexec: Add script to address issues when task re-execution 2012-05-18 15:25:11 +01:00
test-remote-image scripts: python3: change python to python3 in shebang 2016-06-03 13:13:29 +01:00
verify-bashisms scripts: add tool to scan for bashisms recipe shell scripts 2016-09-16 15:24:03 +01:00
wic scripts: Fixed typo in parameter that was causing exception 2016-07-08 09:57:25 +01:00
wipe-sysroot wipe-sysroot: fix wrong glob when removing manifests 2016-05-22 16:11:12 +01:00
yocto-bsp yocto-bsp: Refactor script to use argparse instead of optparse 2016-07-07 13:38:13 +01:00
yocto-kernel scripts: Fixed typo in parameter that was causing exception 2016-07-07 13:38:13 +01:00
yocto-layer scripts: Fixed typo in parameter that was causing exception 2016-07-07 13:38:13 +01:00

README

This directory contains Various useful scripts for working with OE builds