Bug 60156 - TCPSampler : Latency is not measured for TCP Sampler
Summary: TCPSampler : Latency is not measured for TCP Sampler
Status: CLOSED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: All All
: P2 enhancement with 2 votes (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2016-09-20 13:46 UTC by Tamas Szabadi
Modified: 2017-10-11 14:44 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tamas Szabadi 2016-09-20 13:46:47 UTC
TCP Sampler results have always 0 as latency. It seems that .latencyEnd() is not called anywhere in the TCPSampler or in its implementations.

I can't just create a new custom TCPSamplerImpl implementation because the TCPClient interface doesn't specify a read method with the SampleResult passed in to make it able to call 'latencyEnd' on it.
Comment 1 Philippe Mouawad 2016-09-20 20:43:07 UTC
@Team, another Bugzilla where Java8 default method would allow us to add to TCPClient:

    public String read(InputStream is, SampleResult sampleResult)
            throws ReadException 


Regards
Comment 2 UbikLoadPack support 2017-09-02 20:19:02 UTC
Hello,
Proposed PR for this:

- https://github.com/apache/jmeter/pull/306

Please review.

Thanks
Comment 3 Philippe Mouawad 2017-09-08 11:56:05 UTC
Author: pmouawad
Date: Fri Sep  8 11:55:40 2017
New Revision: 1807719

URL: http://svn.apache.org/viewvc?rev=1807719&view=rev
Log:
Bug 60156 - TCPSampler : Latency is not measured for TCP Sampler
Contributed by UbikLoadPack
Bugzilla Id: 60156

Modified:
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/AbstractTCPClient.java
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImpl.java
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImpl.java
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java
    jmeter/trunk/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPSampler.java
    jmeter/trunk/xdocs/changes.xml
Comment 4 Philippe Mouawad 2017-09-08 17:05:25 UTC
Author: pmouawad
Date: Fri Sep  8 17:03:16 2017
New Revision: 1807786

URL: http://svn.apache.org/viewvc?rev=1807786&view=rev
Log:
Bug 60156 - TCPSampler : Latency is not measured for TCP Sampler
Contributed by UbikLoadPack
Oups forgot to commit tests
Bugzilla Id: 60156

Modified:
    jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/BinaryTCPClientImplTest.java
    jmeter/trunk/test/src/org/apache/jmeter/protocol/tcp/sampler/LengthPrefixedBinaryTCPClientImplTest.java
Comment 5 The ASF infrastructure team 2022-09-24 20:38:05 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4121