cli_info: Dump per frame metrics for trace files
Added extra information to cli_info output which includes:
* container type (compression method)
* container size (the size of the data in the storage container)
* actual data size (the size of uncompressed data)
* per frame metrics which include the folowing information:
* first call_id
* last call_id
* the total amount of calls in a frame
* uncompressed frame size
Usage:
apitrace info --dump-frames /path/to/file.trace
An example output:
{
"FileName": "/path/to/file.trace",
"ContainerVersion": 6,
"ContainerType": "Snappy",
"API": "OpenGL + GLX/WGL/CGL",
"FramesCount": 1789,
"ActualDataSize": 5272672851,
"ContainerSize": 1547699157,
"Frames": [{
"FirstCallId": 0,
"LastCallId": 2231,
"TotalCalls": 2232,
"SizeInBytes": 1259924
}, {
"FirstCallId": 2232,
"LastCallId": 2251,
"TotalCalls": 20,
"SizeInBytes": 449
}, {
[...]
]}
}
This information could be useful to analyze the data distribution in a
trace file, find transition points menu/game/etc, choose better point
for a trace file trimming, and so on.
Change-Id: I7eb98a8303393af229b6afdcb3036fea873b38d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/apitrace/+/2272088
Tested-by: Robert Tarasov <tutankhamen@chromium.org>
Commit-Queue: Robert Tarasov <tutankhamen@chromium.org>
Reviewed-by: David Riley <davidriley@chromium.org>
6 files changed