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

Offer ability to remove TTFB variance from experiment comparison #2331

Merged
merged 7 commits into from
Sep 7, 2022

Conversation

scottjehl
Copy link
Contributor

This implements a check for TTFB differences and when they are greater than 100ms, offers a link to view the comparison with TTFB ignored from all additive metrics. fixes #2329

…r than 100ms, offers a link to view the comparison with TTFB ignored from all additive metrics. fixes #2329
global $removeTTFBfromDiffs;
if (
$removeTTFBfromDiffs
&& ($metric === "render"
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of having to list out metric names again, could we append a value to the $diffMetrics array indicating whether or not a metric should be impacted by TTFB removal? Just thinking it avoids duplicating metric names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure! good call.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, we need to move all these strings as const/struct of some sort at some point. String are too easy to mistype

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@stoyan stoyan left a comment

Choose a reason for hiding this comment

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

This is awesome! Couple of nits inline...

global $removeTTFBfromDiffs;
if (
$removeTTFBfromDiffs
&& ($metric === "render"
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, we need to move all these strings as const/struct of some sort at some point. String are too easy to mistype

// check if metric might benefit from TTFB removal
function ignoreTTFBforMetric($metric)
{
global $removeTTFBfromDiffs;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not pass this to the function instead of using a global?

www/experiments/findings.inc Outdated Show resolved Hide resolved
@scottjehl scottjehl merged commit b68a1a5 into master Sep 7, 2022
@scottjehl scottjehl deleted the 2329 branch September 7, 2022 20:52
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.

Experiment Compare values could adjust for TTFB variance, at least optionally
3 participants