From 7942d0301075ec29487d926c8dcf8a5c12c2a23f Mon Sep 17 00:00:00 2001 From: junyejiang Date: Mon, 13 Jan 2025 22:32:00 +0800 Subject: [PATCH] Stripping success result in order to speed up transmit in distributed test mode. --- .../samplers/DataStrippingSampleSender.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/core/src/main/java/org/apache/jmeter/samplers/DataStrippingSampleSender.java b/src/core/src/main/java/org/apache/jmeter/samplers/DataStrippingSampleSender.java index 8df3fd7b83c..9af8e924205 100644 --- a/src/core/src/main/java/org/apache/jmeter/samplers/DataStrippingSampleSender.java +++ b/src/core/src/main/java/org/apache/jmeter/samplers/DataStrippingSampleSender.java @@ -126,6 +126,24 @@ private static void stripContent(SampleResult result, int level) { private static void stripResponse(SampleResult result) { result.setBytes(result.getBytesAsLong()); result.setResponseData(EMPTY_BA); + + if (result.isSuccessful()) { + result.setSentBytes(result.getSentBytes()); + result.setSamplerData(null); + result.setRequestHeaders(null); + + result.setBodySize(result.getBodySizeAsLong()); + result.setDataType(null); + result.setDataEncoding(null); + + result.setHeadersSize(result.getHeadersSize()); + result.setResponseHeaders(null); + + result.setURL(null); + + result.setResponseMessage(null); + result.setResponseCode(null); + } } /**