Lines 210-220
Link Here
|
210 |
|
210 |
|
211 |
private int sampleCount = 1; |
211 |
private int sampleCount = 1; |
212 |
|
212 |
|
213 |
private int bytes = 0; // Allows override of sample size in case sampler does not want to store all the data |
213 |
private long bytes = 0; // Allows override of sample size in case sampler does not want to store all the data |
214 |
|
214 |
|
215 |
private int headersSize = 0; |
215 |
private int headersSize = 0; |
216 |
|
216 |
|
217 |
private int bodySize = 0; |
217 |
private long bodySize = 0; |
218 |
|
218 |
|
219 |
/** Currently active threads in this thread group */ |
219 |
/** Currently active threads in this thread group */ |
220 |
private volatile int groupThreads = 0; |
220 |
private volatile int groupThreads = 0; |
Lines 610-618
Link Here
|
610 |
// Extend the time to the end of the added sample |
610 |
// Extend the time to the end of the added sample |
611 |
setEndTime(Math.max(getEndTime(), subResult.getEndTime() + nanoTimeOffset - subResult.nanoTimeOffset)); // Bug 51855 |
611 |
setEndTime(Math.max(getEndTime(), subResult.getEndTime() + nanoTimeOffset - subResult.nanoTimeOffset)); // Bug 51855 |
612 |
// Include the byte count for the added sample |
612 |
// Include the byte count for the added sample |
613 |
setBytes(getBytes() + subResult.getBytes()); |
613 |
setBytes(getBytesAsLong() + subResult.getBytesAsLong()); |
614 |
setHeadersSize(getHeadersSize() + subResult.getHeadersSize()); |
614 |
setHeadersSize(getHeadersSize() + subResult.getHeadersSize()); |
615 |
setBodySize(getBodySize() + subResult.getBodySize()); |
615 |
setBodySize(getBodySizeAsLong() + subResult.getBodySizeAsLong()); |
616 |
addRawSubResult(subResult); |
616 |
addRawSubResult(subResult); |
617 |
} |
617 |
} |
618 |
|
618 |
|
Lines 1190-1212
Link Here
|
1190 |
* @param length |
1190 |
* @param length |
1191 |
* the number of bytes of the response data for this sample |
1191 |
* the number of bytes of the response data for this sample |
1192 |
*/ |
1192 |
*/ |
1193 |
public void setBytes(int length) { |
1193 |
public void setBytes(long length) { |
1194 |
bytes = length; |
1194 |
bytes = length; |
1195 |
} |
1195 |
} |
1196 |
|
1196 |
|
|
|
1197 |
/** |
1198 |
* In the event the sampler does want to pass back the actual contents, we |
1199 |
* still want to calculate the throughput. The bytes are the bytes of the |
1200 |
* response data. |
1201 |
* |
1202 |
* @param length |
1203 |
* the number of bytes of the response data for this sample |
1204 |
* @deprecated use setBytes(long) |
1205 |
*/ |
1206 |
@Deprecated |
1207 |
public void setBytes(int length) { |
1208 |
setBytes((long) length); |
1209 |
} |
1210 |
|
1197 |
/** |
1211 |
/** |
1198 |
* return the bytes returned by the response. |
1212 |
* return the bytes returned by the response. |
1199 |
* |
1213 |
* |
1200 |
* @return byte count |
1214 |
* @return byte count |
|
|
1215 |
* @deprecated use getBytesAsLong |
1201 |
*/ |
1216 |
*/ |
|
|
1217 |
@Deprecated |
1202 |
public int getBytes() { |
1218 |
public int getBytes() { |
|
|
1219 |
return (int) getBytesAsLong(); |
1220 |
} |
1221 |
|
1222 |
/** |
1223 |
* return the bytes returned by the response. |
1224 |
* |
1225 |
* @return byte count |
1226 |
*/ |
1227 |
public long getBytesAsLong() { |
1203 |
if (GETBYTES_NETWORK_SIZE) { |
1228 |
if (GETBYTES_NETWORK_SIZE) { |
1204 |
int tmpSum = this.getHeadersSize() + this.getBodySize(); |
1229 |
long tmpSum = this.getHeadersSize() + this.getBodySizeAsLong(); |
1205 |
return tmpSum == 0 ? bytes : tmpSum; |
1230 |
return tmpSum == 0 ? bytes : tmpSum; |
1206 |
} else if (GETBYTES_HEADERS_SIZE) { |
1231 |
} else if (GETBYTES_HEADERS_SIZE) { |
1207 |
return this.getHeadersSize(); |
1232 |
return this.getHeadersSize(); |
1208 |
} else if (GETBYTES_BODY_REALSIZE) { |
1233 |
} else if (GETBYTES_BODY_REALSIZE) { |
1209 |
return this.getBodySize(); |
1234 |
return this.getBodySizeAsLong(); |
1210 |
} |
1235 |
} |
1211 |
return bytes == 0 ? responseData.length : bytes; |
1236 |
return bytes == 0 ? responseData.length : bytes; |
1212 |
} |
1237 |
} |
Lines 1364-1377
Link Here
|
1364 |
/** |
1389 |
/** |
1365 |
* @return the body size in bytes |
1390 |
* @return the body size in bytes |
1366 |
*/ |
1391 |
*/ |
|
|
1392 |
@Deprecated |
1367 |
public int getBodySize() { |
1393 |
public int getBodySize() { |
|
|
1394 |
return (int) getBodySizeAsLong(); |
1395 |
} |
1396 |
|
1397 |
/** |
1398 |
* @return the body size in bytes |
1399 |
*/ |
1400 |
public long getBodySizeAsLong() { |
1368 |
return bodySize == 0 ? responseData.length : bodySize; |
1401 |
return bodySize == 0 ? responseData.length : bodySize; |
1369 |
} |
1402 |
} |
1370 |
|
1403 |
|
1371 |
/** |
1404 |
/** |
1372 |
* @param bodySize the body size to set |
1405 |
* @param bodySize the body size to set |
1373 |
*/ |
1406 |
*/ |
1374 |
public void setBodySize(int bodySize) { |
1407 |
public void setBodySize(long bodySize) { |
1375 |
this.bodySize = bodySize; |
1408 |
this.bodySize = bodySize; |
1376 |
} |
1409 |
} |
1377 |
|
1410 |
|