Revert "Filter out NaNs before uploading to the dasboard"
This reverts commit 9db3ab201ec73d5bbc547ebe2701b4695d1e281f.
Reason for revert: We shouldn't delete numbers from "running", since they represent count, mean, max, min, sum, variance and meanlogs. Just removing will lead to undefined behaviur.
Original change's description:
> Filter out NaNs before uploading to the dasboard
>
> No-Presubmit: True
> Bug: webrtc:12224
> Change-Id: I48a140f08276362491650496f63a23727c56fa6e
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195320
> Commit-Queue: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#32690}
TBR=mbonadei@webrtc.org,landrey@webrtc.org
Change-Id: If2b0bd5046d040b8289eefd22e313ce554b98bff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:12224
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/195323
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Andrey Logvin <landrey@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32691}
diff --git a/tools_webrtc/perf/catapult_uploader.py b/tools_webrtc/perf/catapult_uploader.py
index bca641a..2760f73 100644
--- a/tools_webrtc/perf/catapult_uploader.py
+++ b/tools_webrtc/perf/catapult_uploader.py
@@ -10,7 +10,6 @@
import datetime
import httplib2
import json
-import math
import subprocess
import time
import zlib
@@ -171,8 +170,7 @@
# TODO(https://crbug.com/1029452): HACKHACK
-# Remove once we have doubles in the proto and handle -infinity and NaN
-# correctly.
+# Remove once we have doubles in the proto and handle -infinity correctly.
def _ApplyHacks(dicts):
def _NoInf(value):
if value == float('inf'):
@@ -183,12 +181,8 @@
for d in dicts:
if 'running' in d:
- d['running'] = [
- _NoInf(value) for value in d['running']
- if not math.isnan(value)]
+ d['running'] = [_NoInf(value) for value in d['running']]
if 'sampleValues' in d:
- # We always have a single sample value. If it's NaN - the upload
- # should fail.
d['sampleValues'] = [_NoInf(value) for value in d['sampleValues']]
return dicts