提交 8170e37d authored 作者: blu's avatar blu

feature: report status

上级 0cfeb9aa
......@@ -1332,6 +1332,7 @@ public:
json ipcsData = this->peerData["ipcStatus"];
json summary;
json stats;
vector<string> tags = {"E0C0", "E0C1", "E1C0", "E1C1"};
for(auto &[k,v]: ipcsData.items()){
json diff = json::diff(v["expected"], v["current"]);
if(diff.size() != 0) {
......@@ -1340,16 +1341,14 @@ public:
summary["ok"].push_back(k);
}
vector<string> tags = {"E0C0", "E0C1", "E1C0", "E1C1"};
for(auto &[m, n]: v["current"].items()){
auto x = v["expected"][m].get<bool>();
int c = n?1:0;
int e = x?1:0;
int r = (e<<1)|c;
auto tag = tags[r];
auto mod = strutils::split(m, ':');
if(mod.size() == 3) {
// init
if(stats.count(mod[1]) == 0) {
......@@ -1358,7 +1357,6 @@ public:
stats[mod[1]][t] = 0;
}
}
// increment
stats[mod[1]][tag] = stats[mod[1]][tag].get<int>() + 1;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论