Bug 64553 - When using Transaction Controller, send Bytes and Received Bytes are displayed as 0 in the influxdb(BackendListener).
Summary: When using Transaction Controller, send Bytes and Received Bytes are displaye...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.0
Hardware: All All
: P2 major (vote)
Target Milestone: JMETER_5.4
Assignee: JMeter issues mailing list
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2020-06-24 02:58 UTC by davelee
Modified: 2020-08-30 13:00 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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(-)