[wperf, wperf-scripts, wperf-common] WPERF-1223: Implement cmnlist command
Introduction
This MR introduces the cmnlist
command to the wperf
CLI. The command lists CMN-related capabilities such as mesh families, devices, events, filters, and watchpoints in either a human-readable or JSON format.
cmnlist
Behaviour of - On systems without a CMN: lists all known CMN capabilities.
- On systems with a CMN: lists only capabilities relevant to the local CMN.
- Use
--all
or-a
flag to force list all supported CMN features data.
Demo
The tabular output is split into sections. Each section delimits the supported device for a mesh family. The section also includes events, filters watchpoints etc. related to the device. Use optional query argument to filter results by the "Name" column.
This is, as ever, compatible with -x
to make useful scripts like counting how many different watchpoints are supported:
> wperf cmnlist -x ',' | ConvertFrom-Csv | where {$_.Type -eq "Watchpoint"} | measure | select "count"
Count
-----
86
Use --json
to obtain a JSON of the information. This is compatible with --verbose
to provide extra details.
Key Points
- New JSON schema for
cmnlist
json output - Modifications to
wperf-scripts/generate_JSONObject_from_schema.py
to prevent duplicate types generated std::variant declarations - implement
cmnlist
functions inclass cmn_device
- modifications to help output
- update and add relevant tests and documentation
In this patch:
- wperf, wperf-scripts: use hex strings based on TS json
- wperf: update documentation
- wperf-scripts: add tests for cmnlist
- wperf, wperf-common: implement cli filtering and --all interface
- wperf-scripts: add basic json tests
- wperf: add cmnlist json and tabular output
- wperf-scripts: prevent duplicate types in generated std::variant declarations
- wperf-scripts: add cmnlist json schema
Testing
wperf-test
Tests in group: 325
Total Duration: 1.2 sec
Outcomes
325 Passed
wperf_cli_cmninfo_test.py ............... [ 1%]
wperf_cli_cmnlist_test.py .................................................................... [ 5%]
wperf_cli_common_test.py ............. [ 6%]
wperf_cli_config_test.py ................ [ 7%]
wperf_cli_cpython_bench_test.py .s [ 7%]
wperf_cli_cpython_dep_record_spe_cli_test.py ................................................................................ [ 13%]
................... [ 14%]
wperf_cli_cpython_dep_record_spe_test.py ......................... [ 16%]
wperf_cli_cpython_dep_record_test.py .................. [ 17%]
wperf_cli_cpython_dep_sample_test.py . [ 17%]
wperf_cli_custom_delim_test.py .....................s....s.. [ 19%]
wperf_cli_dmc_test.py s [ 19%]
wperf_cli_dmc_value_test.py s [ 19%]
wperf_cli_extra_events_test.py .... [ 20%]
wperf_cli_hammer_core_test.py .................. [ 21%]
wperf_cli_help_test.py .. [ 21%]
wperf_cli_info_str_test.py . [ 21%]
wperf_cli_json_validator_test.py ................s [ 22%]
wperf_cli_list_test.py ......... [ 23%]
wperf_cli_lock_test.py .. [ 23%]
wperf_cli_man_test.py ............................................................................................ [ 29%]
wperf_cli_man_ts_test.py .................................................................................................... [ 36%]
.......................................................... [ 40%]
wperf_cli_metrics_test.py ..s....s [ 41%]
wperf_cli_metrics_ts_test.py .......................................................................... [ 46%]
wperf_cli_padding_test.py ................................................................................................... [ 53%]
............................................................................................................................. [ 61%]
........................................................................................................................ [ 69%]
wperf_cli_prettytable_test.py ..... [ 70%]
wperf_cli_record_test.py ................s [ 71%]
wperf_cli_sample_test.py .......... [ 72%]
wperf_cli_stat_cmn700_test.py ........ss........ss............ [ 74%]
wperf_cli_stat_cmn_test.py ...... [ 74%]
wperf_cli_stat_multicore_test.py .... [ 74%]
wperf_cli_stat_test.py ......................................................................... [ 79%]
wperf_cli_stat_value_test.py ................................................................................................ [ 86%]
.................................................................................... [ 92%]
wperf_cli_test_test.py ........... [ 93%]
wperf_cli_timeline_test.py .............................................................. [ 97%]
wperf_cli_ustress_bench_test.py ...... [ 97%]
wperf_cli_ustress_dep_wperf_lib_timeline_test.py . [ 97%]
wperf_cli_ustress_dep_wperf_test.py ........... [ 98%]
wperf_cli_ustress_timeline_test.py .................. [ 99%]
wperf_cli_xperf_test.py . [ 99%]
wperf_lib_app_test.py . [ 99%]
wperf_lib_c_compat_test.py . [100%]
Edited by Utsav Goel