Title: [194093] trunk/Websites/perf.webkit.org
- Revision
- 194093
- Author
- [email protected]
- Date
- 2015-12-14 21:15:52 -0800 (Mon, 14 Dec 2015)
Log Message
Using fake timestamp in OS version make some results invisible
https://bugs.webkit.org/show_bug.cgi?id=152289
Reviewed by Stephanie Lewis.
Fix various bugs after r194088.
* public/api/commits.php:
(format_commit): Include the commit order.
* public/v2/data.js:
(CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
* tools/pull-os-versions.py:
(OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
(available_builds_from_command): Exit early when an exception is thrown.
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (194092 => 194093)
--- trunk/Websites/perf.webkit.org/ChangeLog 2015-12-15 04:52:55 UTC (rev 194092)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2015-12-15 05:15:52 UTC (rev 194093)
@@ -1,5 +1,22 @@
2015-12-14 Ryosuke Niwa <[email protected]>
+ Using fake timestamp in OS version make some results invisible
+ https://bugs.webkit.org/show_bug.cgi?id=152289
+
+ Reviewed by Stephanie Lewis.
+
+ Fix various bugs after r194088.
+
+ * public/api/commits.php:
+ (format_commit): Include the commit order.
+ * public/v2/data.js:
+ (CommitLogs._cacheConsecutiveCommits): Sort by commit order when commit time is missing.
+ * tools/pull-os-versions.py:
+ (OSBuildFetcher._assign_order): Use integer instead of fake time for commit order.
+ (available_builds_from_command): Exit early when an exception is thrown.
+
+2015-12-14 Ryosuke Niwa <[email protected]>
+
Fix a typo in the previous commit.
* public/include/report-processor.php:
Modified: trunk/Websites/perf.webkit.org/public/api/commits.php (194092 => 194093)
--- trunk/Websites/perf.webkit.org/public/api/commits.php 2015-12-15 04:52:55 UTC (rev 194092)
+++ trunk/Websites/perf.webkit.org/public/api/commits.php 2015-12-15 05:15:52 UTC (rev 194093)
@@ -116,6 +116,7 @@
'revision' => $commit_row['commit_revision'],
'parent' => $commit_row['commit_parent'],
'time' => Database::to_js_time($commit_row['commit_time']),
+ 'order' => $commit_row['commit_order'],
'authorName' => $committer_row ? $committer_row['committer_name'] : null,
'authorEmail' => $committer_row ? $committer_row['committer_account'] : null,
'message' => $commit_row['commit_message']
Modified: trunk/Websites/perf.webkit.org/public/v2/data.js (194092 => 194093)
--- trunk/Websites/perf.webkit.org/public/v2/data.js 2015-12-15 04:52:55 UTC (rev 194092)
+++ trunk/Websites/perf.webkit.org/public/v2/data.js 2015-12-15 05:15:52 UTC (rev 194093)
@@ -136,7 +136,7 @@
cachedCommits.commitsByTime.push(commit);
});
- cachedCommits.commitsByTime.sort(function (a, b) { return a.time - b.time; });
+ cachedCommits.commitsByTime.sort(function (a, b) { return a.time && b.time ? (a.time - b.time) : (a.order - b.order); });
cachedCommits.commitsByTime.forEach(function (commit, index) { commit.cacheIndex = index; });
}
Modified: trunk/Websites/perf.webkit.org/tools/pull-os-versions.py (194092 => 194093)
--- trunk/Websites/perf.webkit.org/tools/pull-os-versions.py 2015-12-15 04:52:55 UTC (rev 194092)
+++ trunk/Websites/perf.webkit.org/tools/pull-os-versions.py 2015-12-15 05:15:52 UTC (rev 194093)
@@ -79,9 +79,7 @@
kind = ord(match.group('kind').upper()) - ord('A')
minor = int(match.group('minor'))
variant = ord(match.group('variant').upper()) - ord('A') + 1 if match.group('variant') else 0
- # These fake times won't conflict with real commit time since even 99Z9999z is still in Feb 1973
- fake_time = datetime.utcfromtimestamp((major * 100 + kind) * 10000 + minor + float(variant) / 100)
- commit['order'] = fake_time.isoformat()
+ commit['order'] = ((major * 100 + kind) * 10000 + minor) * 100 + variant
def available_builds_from_command(repository_name, command, lines_to_ignore):
@@ -89,6 +87,7 @@
output = subprocess.check_output(command, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as error:
print "Failed:", str(error)
+ return []
regex = re.compile(lines_to_ignore)
return [{'repository': repository_name, 'revision': line} for line in output.split('\n') if not regex.match(line)]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes