#1395 - fix delay between the first active user(s) and the first request(s) in Karate-Gatling #1408
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relevant Issues : #1395
Type of change: Bug fix for existing feature
Whilst running
CatsSimulation
inkarate-gatling
and using logging statements, I found that the lineappears to be very slow (at least when using a high user rate e.g. ramp 100 users during 10 seconds).
This is called from:
To try to speed this up, we should do it once:
However, now
PerfHookTests.java testPerfHook6
fails, but only when run collectively as the collective test suite (it does not fail when ran on it's own). It seems that sometimesscanResult.getResourcesWithPath(removePrefix(path))
returns null and leads to a NullPointerException rather than the expected "Feature not found exception".Digging a bit further, the first three times this method is called it will always returns a non-null value (in this case an empty ResourceList), but after this it can (and does) return null. Therefore we need to add the handling:
Note that rather than
We could instead do this lazily if preferred:
Or: