Bug 42184 - Number of bytes for subsamples not added to sample when sub samples are added
Summary: Number of bytes for subsamples not added to sample when sub samples are added
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.2
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-22 05:15 UTC by Alf Hogemark
Modified: 2007-04-22 06:35 UTC (History)
0 users



Attachments
Suggested patch (7.37 KB, patch)
2007-04-22 05:20 UTC, Alf Hogemark
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alf Hogemark 2007-04-22 05:15:04 UTC
When using HTTP Request sampler, for example, and ticking on the "Download
images" checkbox, the sample for the web page will get the images and other
resources downloaded for the page as subsamples.
The time elapsed for the sample for the web page includes the time it takes to
download the subsamples.
But the number of bytes downloaded for each subsample is not added to the
"parent" sample. Therefore the "number of bytes per second" in the "Summary
report" is incorrect.

I think the number of bytes for a sample should be updated to include the number
of bytes for subsamples added to the sample.
Comment 1 Alf Hogemark 2007-04-22 05:20:43 UTC
Created attachment 20008 [details]
Suggested patch

The suggested patch updates the number of bytes for the sample who receives
subsamples, so that the number of bytes is equal to the sum of bytes for its'
subsamples, plus the number of bytes for the sample itself.

I also think that it would be useful to show the number of bytes for the sample
in the "ViewResultsFullVisualizer" GUI, so I've included that in the patch.

And I have added some unit tests to TestSampleResults.
Comment 2 Sebb 2007-04-22 06:35:41 UTC
Thanks, fixed in r531175.

By the way, I had to change

assertEquals(1d / (totalTime / 1000d), calculator.getRate());
to
assertEquals(1d / (totalTime / 1000d), calculator.getRate(),0d);

as assertEquals(double,double) does not exist in the version of JUnit used by 
JMeter.
Comment 3 The ASF infrastructure team 2022-09-24 20:37:39 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1917