我将以下 JSON 输出写入“out”文件,内容如下。
$猫出去
{
"columns": [
"Tests",
"Errors",
"Mean Test Time (ms)",
"Test Time Standard Deviation (ms)",
"TPS",
"Peak TPS"
],
"status": {
"description": "Collection stopped",
"state": "Stopped"
},
"tests": [
{
"description": "Cheetah client test",
"statistics": [
0,
0,
"NaN",
0.0,
0.0,
0.0
],
"test": 1
},
{
"description": "Reads 95%",
"statistics": [
304000,
0,
8.7931875,
7.948696618436826,
6907.677974959667,
13594.0
],
"test": 101
},
{
"description": "Writes 5%",
"statistics": [
16000,
0,
9.963375,
9.92775949594747,
363.5619986820878,
1638.0
],
"test": 102
}
],
"totals": [
320000,
0,
8.851696875,
8.063234652303947,
7271.239973641756,
14259.0
]
}
我需要与描述块“读取 95%”相关的统计信息以以下格式排列,并使用 BASH 脚本分配给字符串变量。
var=304000,0,8.7931875,7.948696618436826,6907.677974959667,13594.0
非常感激您的帮忙。