Skip to content
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

Fix Hodges-Lehmann distribution ratio calculation #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mgrzaslewicz
Copy link
Contributor

@mgrzaslewicz mgrzaslewicz commented Jul 22, 2024

I hoped to see classification change for added distribution. As it should be detected as an improvement, while in production we have no impact:
image

However previous classification was fine for default tolerance. We're just using a different production tolerance in RegressionCheckIT and improvement is below threshold.
So at least we have a properly calculated Hodges-Lehmann coming with this change.

@@ -2,7 +2,7 @@ package com.atlassian.performance.tools.report.api.judge

import com.atlassian.performance.tools.jiraactions.api.ActionType
import com.atlassian.performance.tools.report.ActionMetricsReader
import com.atlassian.performance.tools.report.api.ShiftedDistributionRegressionTest
import com.atlassian.performance.tools.report.api.distribution.DistributionComparator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No difference detected by RelativeNonparametricPerformanceJudgeTest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No diff here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we don't see why the new one is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you define better? Classification has not changed for unit tested cases and as stated in first PR comment, it's expected

values[k++] = func(baseline[i], experiment[j])
}
}
return Median().withNaNStrategy(NaNStrategy.MINIMAL).evaluate(values)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When used on a set of latency measurements, why would we inject fake negative infinities?

Copy link
Contributor Author

@mgrzaslewicz mgrzaslewicz Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's needed for cases when part of the distribution is the same and other part is different. Without it small difference will be calculated as whole distribution difference and instead of NaN you will get -0.45623836126629425 in attached example
image

Copy link
Member

@dagguh dagguh Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but the workaround injects fake extreme values. Both "before" and "after" seem wrong.
PS. this case is untested, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only value of this PR is to have a relativeShift correctly calculated, it does not improve classification as I hoped. I will prepare a small PR to fix ShiftedDistributionRegressionTest and decline this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants