[webkit-reviews] review granted: [Bug 184131] Added UI to show potential regressions in chart with t-testing against segmentations. : [Attachment 336999] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 4 20:34:15 PDT 2018
Ryosuke Niwa <rniwa at webkit.org> has granted dewei_zhu at apple.com's request for
review:
Bug 184131: Added UI to show potential regressions in chart with t-testing
against segmentations.
https://bugs.webkit.org/show_bug.cgi?id=184131
Attachment 336999: Patch
https://bugs.webkit.org/attachment.cgi?id=336999&action=review
--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 336999
--> https://bugs.webkit.org/attachment.cgi?id=336999
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=336999&action=review
> Websites/perf.webkit.org/ChangeLog:17
> + (Statistics.new.this.findRangesForChangeDetectionsWithWelchsTTest):
Add a description as to why we're incrementing / decrementing the index by 2.
> Websites/perf.webkit.org/public/v3/components/chart-pane-base.js:265
> +
this._renderAnnotationsLazily.evaluate(this._tasksForAnnotations,
this._detectedAnnotations, this._renderedAnnotations);
Just get the list of change types for each task, and add that to the argument
as in:
_renderAnnotationsLazily.evaluate(this._tasksForAnnotations,
this._detectedAnnotations, ...this._tasksForAnnotations.map((task) =>
task.changeType()));
Alternatively, just re-construct ._tasksForAnnotations or _detectedAnnotations
whenever we're currently setting _renderedAnnotations = false.
> Websites/perf.webkit.org/public/v3/components/chart-pane-base.js:-299
> - fillStyle: fillStyle,
We should be computing the fill style here instead.
> Websites/perf.webkit.org/public/v3/components/time-series-chart.js:408
> - context.fillStyle = bar.fillStyle;
> + context.fillStyle =
this._options.annotations.fillStyleForTask(bar.task);
We need to pre-determine the style. TimeSeriesChart shouldn't be aware of a
task.
> Websites/perf.webkit.org/public/v3/models/metric.js:88
> + summarizeForValues(beforeValue, afterValue, betterDescription,
worseDescription)
This is a very vague/generic name. How about labelForDifference?
Also, description is usually used to refer a long paragraph of text.
Why not progressionTypeName and regressionTypeName.
> Websites/perf.webkit.org/public/v3/pages/chart-pane.js:43
> + label: 'Segmentation with t-test analysis',
Again, we should call this "Segmentation with Welch's t-test change detection"
> Websites/perf.webkit.org/public/v3/pages/chart-pane.js:52
> + segmentation.analysisAnnotations =
Statistics.findRangesForChangeDetectionsWithWelchsTTest(timeSeries.values(),
segmentation, parameters[parameters.length - 1]).map((range) => {
Please wrap the line earlier or store the arguments in a local variable so that
this code is easier to read.
> Websites/perf.webkit.org/public/v3/pages/chart-pane.js:68
> + {label: "t-test significance", value: 0.99, type: 'select',
options: Statistics.supportedOneSideTTestProbabilities()},
We don't need to have both "options" and "type". Just detect the presence of
"options".
> Websites/perf.webkit.org/public/v3/pages/chart-pane.js:450
> + if (parameter.type == 'select') {
Just do: "options" in parameter.
> Websites/perf.webkit.org/public/v3/pages/chart-pane.js:453
> + const select = element('select',
> + parameter.options.map((option) =>
element('option',
> + {value: option, selected: option ==
parameter.value}, option)));
Can we just do this in one or two lines?
More information about the webkit-reviews
mailing list