You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "vlsi (via GitHub)" <gi...@apache.org> on 2023/05/17 12:15:30 UTC
[GitHub] [jmeter] vlsi opened a new pull request, #5920: Improve scalability in common cases
vlsi opened a new pull request, #5920:
URL: https://github.com/apache/jmeter/pull/5920
## Description
This is a set of fixes that address common synchronization issues in JMeter.
## Motivation and Context
It would be nice if JMeter could generate high number of concurrent requests without blocking in cases like
* iterating over `TestBean` properties
* retrieving `ThreadGroup.getName()` -> `syncrhonized propMap.get("...")`
* aggregating results into `TOTAL` row, so synchronizing on the counters
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [jmeter] vlsi commented on a diff in pull request #5920: Improve scalability in common cases
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on code in PR #5920:
URL: https://github.com/apache/jmeter/pull/5920#discussion_r1196481242
##########
src/core/src/main/java/org/apache/jmeter/util/Calculator.java:
##########
@@ -115,58 +110,74 @@ public void addSample(SampleResult res) {
addBytes(res.getBytesAsLong());
addSentBytes(res.getSentBytes());
addValue(res.getTime(),res.getSampleCount());
- errors+=res.getErrorCount(); // account for multiple samples
- if (startTime == 0){ // not yet initialised
- startTime=res.getStartTime();
- } else {
- startTime = Math.min(startTime, res.getStartTime());
- }
- elapsedTime = Math.max(elapsedTime, res.getEndTime()-startTime);
+ errors.add(res.getErrorCount()); // account for multiple samples
+ LongAccumulator startTime = this.startTime;
+ startTime.accumulate(res.getStartTime());
+ long testStarted = startTime.get();
Review Comment:
Technically speaking, `startTime` is probably stable, so it might be a slightly better idea to use `AtomicLong` and `accumulateAndGet(res.getStartTime(), Math::min)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [jmeter] vlsi commented on pull request #5920: Improve scalability in common cases
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on PR #5920:
URL: https://github.com/apache/jmeter/pull/5920#issuecomment-1554376273
For reference, the diff is https://github.com/apache/jmeter/compare/e669b83d25a913bc5220b358a94f863d759302b4..a8317d0fdb563ea7580317b9bd123f0e2797bb48
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [jmeter] vlsi closed pull request #5920: Improve scalability in common cases
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi closed pull request #5920: Improve scalability in common cases
URL: https://github.com/apache/jmeter/pull/5920
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org