Comparison Command diff
Command Function
Compares performance data in JSON files generated after multiple rounds of collection and generates terminal and Excel comparison reports.
Syntax
1 | ./ksys diff [-h] -i INPUT INPUT [-o OUTPUT] [-l {0,1,2,3}] |
Parameter Description
Parameter |
Option |
Description |
|---|---|---|
-h/--help |
- |
Obtains help information. This parameter is optional. |
-i/--input |
- |
JSON file directories separated a space. The JSON files must be obtained by running the collect command. This parameter is mandatory. For example: -i /home/test/2025_08_14_15_17_25_report.json /home/test/2025_08_14_16_11_28_report.json NOTE:
The tool can collect performance data at the system, application, or process level. JSON files generated from different data types cannot be compared. |
-o/--output |
- |
Comparison result file directory. This parameter is optional. If you do not set this parameter, an Excel file in the Y_M_D_H_M_S_diff format is generated in the current directory. |
-l/--log-level |
0/1/2/3 |
Log level, which defaults to 1. This parameter is optional.
|
Example
Display the information about diff:
1 | ./ksys diff -h |
Command output:
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). |