fix(性能测试): 修复上传jmx中已有 backend listener 的时候没有去重的问题
--bug=1010227 --user=刘瑞斌 【性能测试】github#10429,性能测试报告日志详情中的summary的值比请求统计中的samples的total值小一半 https://www.tapd.cn/55049933/s/1103469 Closes #10429
This commit is contained in:
parent
78dc8444eb
commit
0f0af3ba27
|
@ -73,8 +73,7 @@ public class JmeterDocumentParser implements EngineSourceParser {
|
|||
|
||||
if (hashTree.elements().size() > 0) {
|
||||
final List<Element> childNodes = hashTree.elements();
|
||||
for (int i = 0; i < childNodes.size(); i++) {
|
||||
Element ele = childNodes.get(i);
|
||||
for (Element ele : childNodes) {
|
||||
if (nodeNameEquals(ele, HASH_TREE_ELEMENT)) {
|
||||
parseHashTree(ele);
|
||||
} else if (nodeNameEquals(ele, TEST_PLAN)) {
|
||||
|
@ -611,6 +610,15 @@ public class JmeterDocumentParser implements EngineSourceParser {
|
|||
|
||||
Element listenerParent = getNextSibling(element);
|
||||
|
||||
List<Element> childNodes = listenerParent.elements();
|
||||
for (Element item : childNodes) {
|
||||
if (nodeNameEquals(item, BACKEND_LISTENER)) {
|
||||
// 如果已经存在,不再添加
|
||||
removeChildren(item);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// add class name
|
||||
Element backendListener = listenerParent.addElement(BACKEND_LISTENER);
|
||||
backendListener.addAttribute("guiclass", "BackendListenerGui");
|
||||
|
|
Loading…
Reference in New Issue