Bug 191457

Summary: commit time returned by '/api/measurement-set' should match the one returned by '/api/commits'.
Product: WebKit Reporter: dewei_zhu
Component: New BugsAssignee: dewei_zhu
Status: RESOLVED FIXED    
Severity: Normal CC: dewei_zhu, dino, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch rniwa: review+

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.