summaryrefslogtreecommitdiffstats
path: root/scripts/task-time
Commit message (Collapse)AuthorAgeFilesLines
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* task-time: Add simple buildstats analysis scriptUlf Magnusson2016-11-061-0/+132
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 adfdca4df18f ("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>