1*b7c941bbSAndroid Build Coastguard WorkerThe parse_test_metrics.py script can be used to parse test metrics json files. Run the following 2*b7c941bbSAndroid Build Coastguard Workercommand to see a demo: 3*b7c941bbSAndroid Build Coastguard Workerpython parse_test_metrics.py CtsCameraTestCases.reportlog.json 4*b7c941bbSAndroid Build Coastguard Worker 5*b7c941bbSAndroid Build Coastguard WorkerTo parse multiple files, list all files as arguments. Try the following: 6*b7c941bbSAndroid Build Coastguard Workerpython parse_test_metrics.py CtsCameraTestCases.reportlog.json CtsUiHostTestCases.reportlog.json 7*b7c941bbSAndroid Build Coastguard Workerpython parse_test_metrics.py *.json 8*b7c941bbSAndroid Build Coastguard Worker 9*b7c941bbSAndroid Build Coastguard WorkerTest metrics json files can be found in $CTS_ROOT/repository/results/$RESULT_DIR/report-log-files/ 10*b7c941bbSAndroid Build Coastguard Workerdirectory. 11*b7c941bbSAndroid Build Coastguard Worker 12*b7c941bbSAndroid Build Coastguard WorkerThe MetricsParser class defines functions to parse a json file. The _Parse function takes a filename 13*b7c941bbSAndroid Build Coastguard Workeras input, reads the json file and adds the json object to json_data. The _PrintJson function 14*b7c941bbSAndroid Build Coastguard Workertakes the filename and corresponding json_data and prints out the streams as key, value pairs. 15