From 77b34eefd93f00cf82086dabda70333d33efad82 Mon Sep 17 00:00:00 2001 From: song-tianyang Date: Mon, 16 Oct 2023 18:20:12 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20tc?= =?UTF-8?q?p=E8=AF=B7=E6=B1=82=E5=AF=BC=E5=87=BA=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E8=BD=AC=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95=E6=97=B6className?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E4=BD=BF=E7=94=A8=E6=88=91=E4=BB=AC=E8=A6=86?= =?UTF-8?q?=E7=9B=96=E4=BA=86=E7=9A=84=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1031030 --user=宋天阳 【性能测试】github#26844,TCP协议性能测试报告与JMeter界面的聚合数据不一致 https://www.tapd.cn/55049933/s/1426786 --- .../api/dto/definition/request/sampler/MsTCPSampler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java index 2ced309321..d5b3cb19fc 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java +++ b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/sampler/MsTCPSampler.java @@ -263,7 +263,12 @@ public class MsTCPSampler extends MsTestElement { tcpSampler.setClassname(this.getClassname()); } if (StringUtils.equals("TCPClientImpl", this.getClassname())) { - tcpSampler.setClassname(MsTCPClientImpl.class.getCanonicalName()); + if (config.isOperating()) { + //导出时className不转换MsTCPClientImpl。 这个类在性能测试时tps会变得很低 + tcpSampler.setClassname(TCPSampler.class.getName()); + } else { + tcpSampler.setClassname(MsTCPClientImpl.class.getCanonicalName()); + } } tcpSampler.setCharset(this.getConnectEncoding()); tcpSampler.setServer(this.getServer());