Title: [194207] trunk/Websites/perf.webkit.org
- Revision
- 194207
- Author
- [email protected]
- Date
- 2015-12-16 20:26:32 -0800 (Wed, 16 Dec 2015)
Log Message
Perf Dashboard v3 UI doesn't show recent data points on v2 UI
https://bugs.webkit.org/show_bug.cgi?id=152368
Reviewed by Chris Dumez.
The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
!clusterEndTime && useCache && +data['lastModified'] < self._lastModified
Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
* public/api/measurement-set.php:
(MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
* tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
of the last modified date depends on when tests run, we can't assert it to be a certain value.
Modified Paths
Diff
Modified: trunk/Websites/perf.webkit.org/ChangeLog (194206 => 194207)
--- trunk/Websites/perf.webkit.org/ChangeLog 2015-12-17 03:48:34 UTC (rev 194206)
+++ trunk/Websites/perf.webkit.org/ChangeLog 2015-12-17 04:26:32 UTC (rev 194207)
@@ -1,5 +1,25 @@
2015-12-16 Ryosuke Niwa <[email protected]>
+ Perf Dashboard v3 UI doesn't show recent data points on v2 UI
+ https://bugs.webkit.org/show_bug.cgi?id=152368
+
+ Reviewed by Chris Dumez.
+
+ The bug was caused by the last modified date in measurement set JSON being a string instead of a POSIX timestamp,
+ which prevented the v3 UI from invalidating the cache. Specifically, the following boolean logic always evaluated
+ to false because +data['lastModified'] was NaN in MeasurementSet.prototype._fetch (/v3/models/measurement-set.js):
+
+ !clusterEndTime && useCache && +data['lastModified'] < self._lastModified
+
+ Fixed the bug by calling Database::to_js_time on the last modified date fetched from the database.
+
+ * public/api/measurement-set.php:
+ (MeasurementSetFetcher::fetch_config_list): Convert the string returned by the database to a POSIX timestamp.
+ * tests/api-measurement-set.js: Added a test to ensure the last modified date in JSON is numeric. Since the value
+ of the last modified date depends on when tests run, we can't assert it to be a certain value.
+
+2015-12-16 Ryosuke Niwa <[email protected]>
+
v3 UI should show and link the build number on charts page
https://bugs.webkit.org/show_bug.cgi?id=152359
Modified: trunk/Websites/perf.webkit.org/public/api/measurement-set.php (194206 => 194207)
--- trunk/Websites/perf.webkit.org/public/api/measurement-set.php 2015-12-17 03:48:34 UTC (rev 194206)
+++ trunk/Websites/perf.webkit.org/public/api/measurement-set.php 2015-12-17 04:26:32 UTC (rev 194207)
@@ -85,7 +85,7 @@
foreach ($config_rows as &$config_row) {
$query = $this->execute_query($config_row['config_id']);
- $this->last_modified = max($this->last_modified, $config_row['config_runs_last_modified']);
+ $this->last_modified = max($this->last_modified, Database::to_js_time($config_row['config_runs_last_modified']));
$measurement_row = $this->db->fetch_next_row($query);
if ($measurement_row) {
Modified: trunk/Websites/perf.webkit.org/tests/api-measurement-set.js (194206 => 194207)
--- trunk/Websites/perf.webkit.org/tests/api-measurement-set.js 2015-12-17 03:48:34 UTC (rev 194206)
+++ trunk/Websites/perf.webkit.org/tests/api-measurement-set.js 2015-12-17 04:26:32 UTC (rev 194207)
@@ -206,6 +206,7 @@
'revisions', 'commitTime', 'build', 'buildTime', 'buildNumber', 'builder']);
assert.equal(paresdResult['startTime'], reportWithBuildTime.startTime);
+ assert(typeof(paresdResult['lastModified']) == 'number', 'lastModified time should be a numeric');
assert.deepEqual(Object.keys(paresdResult['configurations']), ['current']);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes