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());