Bug 195912 - Fix a bug from r226303 that latest build time is not correctly calculated.
Summary: Fix a bug from r226303 that latest build time is not correctly calculated.
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: dewei_zhu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-18 14:13 PDT by dewei_zhu
Modified: 2019-03-18 17:35 PDT (History)
2 users (show)

See Also:


Attachments
Patch (7.19 KB, patch)
2019-03-18 14:15 PDT, dewei_zhu
no flags Details | Formatted Diff | Diff
Patch (3.20 KB, patch)
2019-03-18 15:06 PDT, dewei_zhu
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description dewei_zhu 2019-03-18 14:13:12 PDT
Fix a bug from r226303 that latest build time is not correctly calculated.
Comment 1 dewei_zhu 2019-03-18 14:15:41 PDT
Created attachment 365063 [details]
Patch
Comment 2 Ryosuke Niwa 2019-03-18 14:44:01 PDT
Comment on attachment 365063 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=365063&action=review

> Websites/perf.webkit.org/public/v3/models/time-series.js:21
> +        if (!this._latestBuildPoint || (this._latestBuildPoint.build() &&  this._latestBuildPoint.build().buildTime() < item.build().buildTime()))
> +            this._latestBuildPoint = item;

This is a layering violation. TimeSeries class shouldn't be aware of build() and its values, etc...

> Websites/perf.webkit.org/public/v3/pages/test-freshness-page.js:94
> +                    const latestBuildPoint = currentTimeSeries.latestBuildPoint();

Just find the point based on build time here.
This happens once for each callback from measurementSet.fetchBetween anyway so the perf isn't an issue.
Doing a bunch of checks in TimeSeries.append would be way slower.
Comment 3 dewei_zhu 2019-03-18 15:06:06 PDT
Created attachment 365072 [details]
Patch