Extend LogNormal to add an optional maxValue#3026
Merged
leeturner merged 6 commits intoApr 23, 2025
Merged
Conversation
…e truncated and the value resampled if greater than the max.
…cision causing errors.
…cate the offending distribution.
Under some circumstances, the log normal distribution can create an extra long tail that might cause unwanted timeouts in upstream systems. Therefore, this changed adds the option to specify a maximum value that should be generated.
Contributor
Author
|
@tomakehurst and all, this is a replacement PR for #1694 that enhances |
4 tasks
Contributor
Author
|
Documentation PR is here: wiremock/wiremock.org#353 |
Contributor
|
Thank you for your contribution |
josetruta
pushed a commit
to grupo5-ES-2025-1/wiremock
that referenced
this pull request
Aug 31, 2025
…_of_long_tails_to_lognormal Extend LogNormal to add an optional maxValue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Extend LogNormal to add an optional maxValue to force long tails to be truncated and the value resampled if greater than the max. The reason this might be necessary is that with some log normal configurations, a curve with quite a long tail can be experienced that can cause unexpected or unwanted timeouts in upstream systems. Setting a maximum delay value can prevent this from happening. If the value generated is greater than the max, then it is resampled a number of times (10) and then finally, the max of the two values is taken (to prevent resampling indefinitely)
Documentation changes will be raised in a subsequent PR but look as follows:
References
CappedLogNormalas a new subclass ofLogNormalSubmitter checklist
#help-contributingor a project-specific channel like#wiremock-java