Bug 10622 - buildstats: use JSON format
Summary: buildstats: use JSON format
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-11-08 15:04 UTC by Markus Lehtonen
Modified: 2025-03-13 14:58 UTC (History)
9 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Lehtonen 2016-11-08 15:04:00 UTC
It would be easier to consume buildstats if they were stored in some other format that per-task text files. I would propose using one (per-build) json-formatted file that would contain all tasks from all recipes.

That would make buildstats a lot faster and easier to read. It would also be nicer on the filesystem level to have one file instead of thousands of them per build. Oe-build-perf-test script is already converting existing buildstats into json so we could use that format.
Comment 1 Markus Lehtonen 2016-11-08 15:09:20 UTC
The format could look like this

[
    {
        "name": "bc-native",
        "epoch": null,
        "version": "1.06"
        "revision": "r3",
        "tasks": {
            "do_compile": {
                "child_rusage": {
                    "ru_inblock": 0,
                    "ru_majflt": 0,
                    "ru_maxrss": 55212,
                    "ru_minflt": 80968,
                    "ru_nivcsw": 907,
                    "ru_nvcsw": 320,
                    "ru_oublock": 912,
                    "ru_stime": 0.21015299999999998,
                    "ru_utime": 1.9195280000000001
                },
                "elapsed_time": 2.120001,
                "iostat": {
                    "cancelled_write_bytes": 4096,
                    "rchar": 12604928,
                    "read_bytes": 0,
                    "syscr": 3553,
                    "syscw": 707,
                    "wchar": 885406,
                    "write_bytes": 503808
                },
                "rusage": {
                    "ru_inblock": 0,
                    "ru_majflt": 0,
                    "ru_maxrss": 58512,
                    "ru_minflt": 4503,
                    "ru_nivcsw": 19,
                    "ru_nvcsw": 83,
                    "ru_oublock": 72,
                    "ru_stime": 0.011193,
                    "ru_utime": 0.192331
                },
                "start_time": 1475630641.599999,
                "status": "PASSED"
            },
            "do_configure": {
                    ...
            },
            ...
    },
    {
        "name": "dbus-glib-native",
        ...
    },
    ...
]
Comment 2 Markus Lehtonen 2017-05-05 10:09:37 UTC
Moving to 2.4
Comment 3 Richard Purdie 2019-03-07 15:55:36 UTC
One concern with single or small numbers of files is concurrency and locking. The existing multiple files were done individually to avoid locking issues.