Bug 191457 - commit time returned by '/api/measurement-set' should match the one returned by '/api/commits'.
Summary: commit time returned by '/api/measurement-set' should match the one returned ...
Status: RESOLVED FIXED
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: 2018-11-08 22:21 PST by dewei_zhu
Modified: 2018-11-13 21:32 PST (History)
3 users (show)

See Also:


Attachments
Patch (7.65 KB, patch)
2018-11-08 22:33 PST, dewei_zhu
no flags Details | Formatted Diff | Diff
Patch (7.70 KB, patch)
2018-11-10 00:49 PST, 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 2018-11-08 22:21:36 PST
commit time returned by '/api/measurement-set' should match the one returned by '/api/commits'.
Comment 1 dewei_zhu 2018-11-08 22:33:31 PST
Created attachment 354316 [details]
Patch
Comment 2 Dean Jackson 2018-11-09 10:11:12 PST
Comment on attachment 354316 [details]
Patch

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

> Websites/perf.webkit.org/public/include/db.php:106
> +            // Keep 5 decimal digit to match postgres timestamp behavior.

Typo: digits
Comment 3 dewei_zhu 2018-11-10 00:49:33 PST
Created attachment 354454 [details]
Patch
Comment 4 Ryosuke Niwa 2018-11-10 23:00:02 PST
Comment on attachment 354454 [details]
Patch

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

> Websites/perf.webkit.org/public/include/db.php:105
>          if ($dot_index !== FALSE)

Per WebKit's styling guideline, you'd need { ~ } around the comment & the statement.
Even when there is a single statement, when there is an additional line used for a comment, you'd need { ~ }.

> Websites/perf.webkit.org/public/include/db.php:108
> +            $timestamp_in_ms += round(floatval(substr($time_str, $dot_index)), 5) * 1000;

Did you verify that postgres rounds up 5?
Not even/odd or a round-down? See http://php.net/manual/en/function.round.php for options.
Comment 5 dewei_zhu 2018-11-13 21:32:22 PST
Landed in r238164.