-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure message appears to contradict itself #18
Comments
Hi David, Thank you for using Would you be able to provide a minimal reproduction test case? |
Ok, I've spent some time investigating the reasons behind this nonsensical error message. When assessing whether the expectation matches, two things are taken into account:
A fit quality threshold is a number between 0 and 1. Values above it "tests complexity" do
expect { request }.to perform_power.threshold(0.8)
end So the message Why is this even taken into account? A poor fit quality means that the range of values is hard to approximate to any trend line and the given complexity is only the best estimate. It would be better to 'improve' the test to get a more definite approximation and thus gain confidence about the measured complexity. Now, this is not ideal, and can be resolved in two ways:
expected block to perform power above 0.9 fit quality, but performed power at 0.87 fit quality
I'm reluctant to go the route of removing the threshold because such tests may become very brittle. With low threshold values, the trend line can be hard to estimate and change with each test run. We want high confidence. Hence, I'm more inclined to improve the message and 'educate' about this parameter. Any thoughts? |
Describe the problem
When executing a spec using the power matcher I receive an error that appears to be contradictory.
Steps to reproduce the problem
Create a spec that uses the perform_power matcher.
Your code here to reproduce the issue
Actual behaviour
What happened? This could be a description, log output, error raised etc.
Expected behaviour
What did you expect to happen?
A passing test or a failing test stating the request did not perform power
Describe your environment
rspec-benchmark (0.6.0)
The text was updated successfully, but these errors were encountered: