Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / tools / telemetry / telemetry / value / merge_values.py
index 30c999d..6e28934 100644 (file)
@@ -1,6 +1,11 @@
 # Copyright 2013 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
+
+from telemetry.value import failure
+from telemetry.value import skip
+
+
 def MergeLikeValuesFromSamePage(all_values):
   """Merges values that measure the same thing on the same page.
 
@@ -108,6 +113,15 @@ def GroupStably(all_values, key_func):
   merge_groups = {}
   merge_groups_in_creation_order = []
   for value in all_values:
+    # TODO(chrishenry): This is temporary. When we figure out the
+    # right summarization strategy for page runs with failures/skips, we
+    # should use that instead.
+    should_skip_value = (isinstance(value, failure.FailureValue) or
+                         isinstance(value, skip.SkipValue))
+
+    if should_skip_value:
+      continue
+
     key = key_func(value)
     if key not in merge_groups:
       merge_groups[key] = []