Bug 64553

Summary: When using Transaction Controller, send Bytes and Received Bytes are displayed as 0 in the influxdb(BackendListener).
Product: JMeter - Now in Github Reporter: davelee <dave1.lee>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: major CC: p.mouawad, support
Priority: P2 Keywords: FixedInTrunk
Version: 3.0   
Target Milestone: JMETER_5.4   
Hardware: All   
OS: All   

Description davelee 2020-06-24 02:58:16 UTC
* situation description
I put an HTTP Request under one Transaction Controller. And I used the backend listener and summary report.

 Check the Generate parent sample in the transaction controller. 


* Description of the problem
 
 The summary report displays the Received/Send data normally.

-----------summary data ------------------------------------------------
Label	# Samples	Average	Min	Max	Std. Dev.	Error %	Throughput	Received KB/sec	Sent KB/sec	Avg. Bytes
TEST_PAGE_00000001	2	15	12	19	3.5	0.00%	0.06483	0.61	0.01	9568
TOTAL	2	15	12	19	3.5	0.00%	0.06483	0.61	0.01	9568
-----------------------------------------------------------------------

 
 however, the Received/Send data time data is outputted to 0 when querying influxdb.

name: jmeter_metrics
time                application      avg count countError endedT hit max maxAT meanAT min minAT pct90.0 pct95.0 pct99.0 rb sb startedT statut transaction
----                -----------      --- ----- ---------- ------ --- --- ----- ------ --- ----- ------- ------- ------- -- -- -------- ------ -----------
1592965922734000000 application name                      1              0     0          0                                   1               internal
1592965923039000000 application name 12  1     0                 1   12               12        12      12      12      0  0           all    all
1592965923040000000 application name                      1              1     1          1                                   1               internal
1592965923040000000 application name 12  1                           12               12        12      12      12                     ok     TEST_PAGE_00000001
1592965923040000000 application name 12  1                           12               12        12      12      12      0  0           all    TEST_PAGE_00000001



 The value outputted from the backend listener is invalid.(Received and send data)

 please check source code...
Comment 1 Philippe Mouawad 2020-07-26 09:07:55 UTC
*** Bug 64590 has been marked as a duplicate of this bug. ***
Comment 2 Philippe Mouawad 2020-07-26 09:08:10 UTC
If you have a Transaction Controller with 2 children requests.

The first request:
Size in bytes:12961
Sent bytes:122
Headers size in bytes:344
Body size in bytes:12617


Second request:
Size in bytes:12961
Sent bytes:122
Headers size in bytes:344
Body size in bytes:12617


The TC will have :
Size in bytes:25922
Sent bytes:244
Headers size in bytes:0 => ISSUE
Body size in bytes:0 => ISSUE
Comment 3 Philippe Mouawad 2020-07-26 10:01:31 UTC
(In reply to Philippe Mouawad from comment #2)
> If you have a Transaction Controller with 2 children requests.
> 
> The first request:
> Size in bytes:12961
> Sent bytes:122
> Headers size in bytes:344
> Body size in bytes:12617
> 
> 
> Second request:
> Size in bytes:12961
> Sent bytes:122
> Headers size in bytes:344
> Body size in bytes:12617
> 
> 
> The TC will have :
> Size in bytes:25922
> Sent bytes:244
> Headers size in bytes:0 => ISSUE
> Body size in bytes:0 => ISSUE

Ignore this, it's wrong
Comment 4 davelee 2020-07-27 01:35:01 UTC
I tested with 1 request under transaction controller.
Comment 5 Philippe Mouawad 2020-08-30 13:00:32 UTC
pmouawad pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new 3617f49  Bug 64553 When using Transaction Controller, send Bytes and Received Bytes are displayed as 0 in the influxdb(BackendListener) (#608)
3617f49 is described below

commit 3617f49087201c7d060be10cc3b4c95919c78956
Author: Philippe M <pmouawad@users.noreply.github.com>
AuthorDate: Sun Aug 30 14:58:59 2020 +0200

    Bug 64553 When using Transaction Controller, send Bytes and Received Bytes are displayed as 0 in the influxdb(BackendListener) (#608)

    * 64553 When using Transaction Controller, send Bytes and Received Bytes
    are displayed as 0 in the influxdb(BackendListener)

    * Fix typo of parameter name

    * Give the cumulated add its own method

    * Add test cases for new method addCumulated

    * Method getSubResults constructs new arrays, so call only once inside method

    * Fix conflict

    Co-authored-by: Felix Schumacher <felix.schumacher@internetallee.de>
---
 .../jmeter/visualizers/backend/SamplerMetric.java  | 51 +++++++++++-----
 .../graphite/GraphiteBackendListenerClient.java    |  2 +-
 .../backend/influxdb/HttpMetricsSender.java        |  5 +-
 .../influxdb/InfluxdbBackendListenerClient.java    | 18 +++---
 .../backend/SamplerMetricFixedModeTest.java        | 62 ++++++++++++++++++++
 .../backend/SamplerMetricTimedModeTest.java        | 68 +++++++++++++++++++++-
 xdocs/changes.xml                                  |  1 +
 7 files changed, 180 insertions(+), 27 deletions(-)
Comment 6 The ASF infrastructure team 2022-09-24 20:38:20 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5345