diff对比命令
命令功能
支持对多次采集生成的JSON文件进行性能数据对比,并输出终端报告和Excel报告。
命令格式
1 | ksys diff [-h] -i INPUT INPUT [-o OUTPUT] [-l {0,1,2,3}] |
参数说明
参数 |
参数选项 |
参数说明 |
---|---|---|
-h/--help |
- |
可选参数,获取帮助信息。 |
-i/--input |
- |
必选参数,指定两个JSON文件的路径,该JSON文件必须是使用collect命令采集得到的,文件之间用空格隔开。 例如: -i /home/test/2025_08_14_15_17_25_report.json /home/test/2025_08_14_16_11_28_report.json |
-o/--output |
- |
可选参数,指定对比结果存放目录,不指定则在当前目录下生成格式为“Y_M_D_H_M_S_diff”的Excel文件。 |
-l/--log-level |
0/1/2/3 |
可选参数,设置日志级别,默认为1。
|
使用示例
执行以下命令,查看diff命令支持的功能信息:
1 | ksys diff -h |
返回信息如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | USAGE ksys diff [-h] -i INPUT INPUT [-o OUTPUT] [-l {0,1,2,3}] DESCRIPTION Create a compare command line task. options: -h, --help show this help message and exit -i INPUT INPUT, --input INPUT INPUT Input two JSON file's paths. These files must be collected by running the collect command. In the report, the first input file's data locates under the header 'Before', and the second input file's data locates under the header 'After'. -o OUTPUT, --output OUTPUT Output the full path. -l {0,1,2,3}, --log-level {0,1,2,3} Set the log level (0=DEBUG, 1=INFO, 2=WARNING, 3=ERROR), which defaults to 1(INFO). |
父主题: 鲲鹏系统性能方法论分析工具