Title: [172410] trunk/Websites/perf.webkit.org
Revision
172410
Author
[email protected]
Date
2014-08-11 13:48:32 -0700 (Mon, 11 Aug 2014)

Log Message

Merging platforms mixes baselines and targets into reported data
https://bugs.webkit.org/show_bug.cgi?id=135260

Reviewed by Andreas Kling.

When merging two platforms, move test configurations of a different type (baseline, target)
as well as of different metric (Time, Runs).

Also avoid fetching the entire table of runs just to see if there are no remaining runs.
It's sufficient to detect one such test_runs object.

* public/admin/platforms.php:
(merge_platforms):

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (172409 => 172410)


--- trunk/Websites/perf.webkit.org/ChangeLog	2014-08-11 20:42:16 UTC (rev 172409)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2014-08-11 20:48:32 UTC (rev 172410)
@@ -1,3 +1,19 @@
+2014-08-11  Ryosuke Niwa  <[email protected]>
+
+        Merging platforms mixes baselines and targets into reported data
+        https://bugs.webkit.org/show_bug.cgi?id=135260
+
+        Reviewed by Andreas Kling.
+
+        When merging two platforms, move test configurations of a different type (baseline, target)
+        as well as of different metric (Time, Runs).
+
+        Also avoid fetching the entire table of runs just to see if there are no remaining runs.
+        It's sufficient to detect one such test_runs object.
+
+        * public/admin/platforms.php:
+        (merge_platforms):
+
 2014-07-30  Ryosuke Niwa  <[email protected]>
 
         Merging platforms mixes baselines and targets into reported data

Modified: trunk/Websites/perf.webkit.org/public/admin/platforms.php (172409 => 172410)


--- trunk/Websites/perf.webkit.org/public/admin/platforms.php	2014-08-11 20:42:16 UTC (rev 172409)
+++ trunk/Websites/perf.webkit.org/public/admin/platforms.php	2014-08-11 20:48:32 UTC (rev 172410)
@@ -22,13 +22,14 @@
     // Then migrate test configurations that don't exist in the destination platform to the new platform
     // so that test runs associated with those configurations are moved to the destination.
     if ($db->query_and_get_affected_rows('UPDATE test_configurations SET config_platform = $2
-        WHERE config_platform = $1 AND config_metric NOT IN (SELECT config_metric FROM test_configurations WHERE config_platform = $2)',
+        WHERE config_platform = $1 AND (config_metric NOT IN (SELECT config_metric FROM test_configurations WHERE config_platform = $2)
+            OR config_type NOT IN (SELECT config_type FROM test_configurations WHERE config_platform = $2))',
         array($platform_to_merge, $destination_platform)) === FALSE) {
         $db->rollback_transaction();
         return notice("Failed to migrate test configurations for $platform_to_merge.");
     }
 
-    if ($db->query_and_fetch_all('SELECT * FROM test_runs, test_configurations WHERE run_config = config_id AND config_platform = $1', array($platform_to_merge))) {
+    if ($db->query_and_fetch_all('SELECT * FROM test_runs, test_configurations WHERE run_config = config_id AND config_platform = $1 LIMIT 1', array($platform_to_merge))) {
         // We should never reach here.
         $db->rollback_transaction();
         return notice('Failed to migrate all test runs.');
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to