@@ -7122,13 +7122,10 @@ https://github.com/Tencent/APIJSON/issues
7122
7122
var tr2 = rand.TestRecord;
7123
7123
if (tr2 == null) {
7124
7124
allImgMiss ++;
7125
- if (isAfter) {
7126
- sameImgMiss ++;
7127
- }
7128
7125
continue;
7129
7126
}
7130
7127
7131
- var isAfter = sameIds.includes(rand .id);
7128
+ var isAfter = tr2.reportId != this.reportId && sameIds.includes(tr2 .id);
7132
7129
if (isAfter) {
7133
7130
sameImgTotal ++;
7134
7131
}
@@ -7268,7 +7265,7 @@ https://github.com/Tencent/APIJSON/issues
7268
7265
"TestRecord:beforeSame": {
7269
7266
// "reportId{}@": "TestRecord-reportId:ids2[]",
7270
7267
// 'randomId{}': beforeIds.length <= 0 ? null : beforeIds,
7271
- 'id{}': beforeIds.length <= 0 ? null : beforeIds ,
7268
+ 'id{}': beforeIds,
7272
7269
'documentId': did,
7273
7270
"@column": "sum(total):allTotal;sum(correct):allCorrect;sum(wrong):allWrong;sum(miss):allMiss;count(*):imgTotal;sum(wrong + miss <= 0):imgCorrect;sum(wrong > 0):imgWrong;sum(miss > 0):imgMiss",
7274
7271
"@raw": "@column",
@@ -7311,12 +7308,12 @@ https://github.com/Tencent/APIJSON/issues
7311
7308
const extra = extras[i] || {};
7312
7309
const imgTotal = detection[stage + 'ImgTotal'] = +(tr.imgTotal || tr.imgCorrect || 0) + +(extra.imgTotal || 0);
7313
7310
const imgWrong = detection[stage + 'ImgWrong'] = +(tr.imgWrong || 0) + +(extra.imgWrong || 0);
7314
- const imgCorrect = detection[stage + 'ImgCorrect'] = (+(tr.imgCorrect || 0) + +(extra.imgCorrect || 0)) || (imgTotal - imgWrong);
7311
+ const imgCorrect = detection[stage + 'ImgCorrect'] = (+(tr.imgCorrect || 0) + +(extra.imgCorrect || 0)); // 前面为 0 会导致后面的计算 || (imgTotal - imgWrong);
7315
7312
const imgMiss = detection[stage + 'ImgMiss'] = (+(tr.imgMiss || 0) + +(extra.imgMiss || 0)) || (imgTotal - imgCorrect);
7316
7313
7317
7314
const allTotal = detection[stage + 'AllTotal'] = +(tr.allTotal || tr.allCorrect || 0) + +(extra.allTotal || 0);
7318
7315
const allWrong = detection[stage + 'AllWrong'] = +(tr.allWrong || 0) + +(extra.allWrong || 0);
7319
- const allCorrect = detection[stage + 'AllCorrect'] = (+(tr.allCorrect || 0) + +(extra.allCorrect || 0)) || (allTotal - allWrong);
7316
+ const allCorrect = detection[stage + 'AllCorrect'] = (+(tr.allCorrect || 0) + +(extra.allCorrect || 0)); // 前面为 0 会导致后面的计算 || (allTotal - allWrong);
7320
7317
const allMiss = detection[stage + 'AllMiss'] = (+(tr.allMiss || 0) + +(extra.allMiss || 0)) || (allTotal - allCorrect);
7321
7318
7322
7319
const imgRecall = detection[stage + 'ImgRecall'] = imgCorrect / imgTotal; // allImgCorrect / allImgTotal;
@@ -12065,6 +12062,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
12065
12062
tr.compare = cmp
12066
12063
var status = res == null ? null : res.status
12067
12064
12065
+ var isSame = false
12068
12066
it = it || {}
12069
12067
var p = cmp.path
12070
12068
it.compareType = cmp.code;
@@ -12107,20 +12105,29 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
12107
12105
default:
12108
12106
it.compareColor = 'white'
12109
12107
it.hintMessage = '结果正确'
12110
- if (isRandom && tr.id != null) {
12111
- var sameIds = this.sameIds || [];
12112
- if (! sameIds.includes(tr.id)) {
12113
- sameIds.push(tr.id);
12114
- this.sameIds = sameIds;
12115
- }
12116
- }
12108
+ isSame = tr.reportId != this.reportId
12117
12109
break;
12118
12110
}
12119
12111
12120
12112
if (isRandom) {
12121
12113
r = r || {}
12122
12114
it.Random = r
12123
12115
12116
+ if (tr.id != null) {
12117
+ var sameIds = this.sameIds || []
12118
+ var ind = sameIds.indexOf(tr.id)
12119
+ if (isSame) {
12120
+ if (ind < 0) {
12121
+ sameIds.push(tr.id)
12122
+ }
12123
+ } else {
12124
+ if (ind >= 0) {
12125
+ sameIds.splice(ind, 1)
12126
+ }
12127
+ }
12128
+ this.sameIds = sameIds;
12129
+ }
12130
+
12124
12131
this.updateToRandomSummary(it, 1, accountIndex)
12125
12132
}
12126
12133
else {
@@ -12607,7 +12614,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
12607
12614
delete obj["time:start|duration|end"]
12608
12615
delete obj["time:start|duration|end|parse|sql"]
12609
12616
delete obj["time:start|duration|end|parse|sql|model"]
12610
- delete obj["detect -time:start|duration|end"]
12617
+ delete obj["det -time:start|duration|end"]
12611
12618
delete obj["pose-time:start|duration|end"]
12612
12619
delete obj["seg-time:start|duration|end"]
12613
12620
delete obj["obb-time:start|duration|end"]
@@ -12886,12 +12893,12 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
12886
12893
12887
12894
if (isRandom) {
12888
12895
App.updateToRandomSummary(item, -1, App.currentAccountIndex)
12889
- if (App.compareRandomIds instanceof Array) {
12890
- var ind = App.compareRandomIds.indexOf(random.id);
12891
- if (ind >= 0) {
12892
- App.compareRandomIds.splice(ind, 1)
12893
- }
12894
- }
12896
+ // if (App.compareRandomIds instanceof Array) {
12897
+ // var ind = App.compareRandomIds.indexOf(random.id);
12898
+ // if (ind >= 0) {
12899
+ // App.compareRandomIds.splice(ind, 1)
12900
+ // }
12901
+ // }
12895
12902
} else {
12896
12903
App.updateToSummary(item, -1, App.currentAccountIndex)
12897
12904
}
@@ -12908,7 +12915,8 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
12908
12915
item.TestRecord = null
12909
12916
}
12910
12917
12911
- App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : parseJSON(rawRspStr), isRandom, true, App.currentAccountIndex, isCross)
12918
+ App.updateTestRecord(0, list, index, item, rawRspStr == null ? null : parseJSON(rawRspStr), isRandom, true, App.currentAccountIndex, isCross, true)
12919
+ App.summary();
12912
12920
})
12913
12921
}
12914
12922
else { //上传新的校验标准
@@ -12981,7 +12989,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
12981
12989
// userId: userId,
12982
12990
chainGroupId: cgId,
12983
12991
chainId: cId,
12984
- documentId: random.documentId,
12992
+ documentId: random.documentId || document.id ,
12985
12993
name: random.name,
12986
12994
count: random.count,
12987
12995
config: random.config
@@ -13002,7 +13010,7 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
13002
13010
// userId: userId,
13003
13011
chainGroupId: cgId,
13004
13012
chainId: cId,
13005
- documentId: isNewRandom ? null : (isRandom ? random.documentId : document.id),
13013
+ documentId: isNewRandom ? null : (isRandom ? ( random.documentId || document.id) : document.id),
13006
13014
randomId: isRandom && ! isNewRandom ? random.id : null,
13007
13015
reportId: this.reportId,
13008
13016
host: baseUrl,
@@ -13088,14 +13096,14 @@ Content-Type: ` + contentType) + (StringUtil.isEmpty(headerStr, true) ? '' : hea
13088
13096
}
13089
13097
}
13090
13098
13091
- var rid = random.id || r.id || testRecord.randomId;
13092
- if (rid != null && rid > 0) {
13093
- if (App.compareRandomIds == null) {
13094
- App.compareRandomIds = [rid]
13095
- } else {
13096
- App.compareRandomIds.push(rid)
13097
- }
13098
- }
13099
+ // var rid = random.id || r.id || testRecord.randomId;
13100
+ // if (rid != null && rid > 0) {
13101
+ // if (App.compareRandomIds == null) {
13102
+ // App.compareRandomIds = [rid]
13103
+ // } else {
13104
+ // App.compareRandomIds.push(rid)
13105
+ // }
13106
+ // }
13099
13107
}
13100
13108
item.TestRecord = testRecord
13101
13109
0 commit comments