Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: webrtc/modules/video_coding/codecs/test/plot_webrtc_test_logs.py

Issue 2812273002: Fix lint errors to enable stricter PyLint rules (Closed)
Patch Set: Rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/codecs/test/plot_webrtc_test_logs.py
diff --git a/webrtc/modules/video_coding/codecs/test/plot_webrtc_test_logs.py b/webrtc/modules/video_coding/codecs/test/plot_webrtc_test_logs.py
index 80728f5a4d0e4527e4a57dc57cc21234993141f1..0488ac7ac24a435ab9b40eff40d6ad6973bb7cfb 100755
--- a/webrtc/modules/video_coding/codecs/test/plot_webrtc_test_logs.py
+++ b/webrtc/modules/video_coding/codecs/test/plot_webrtc_test_logs.py
@@ -116,16 +116,16 @@ def ParseSetting(filename, setting):
settings = []
- f = open(filename)
+ settings_file = open(filename)
while True:
- line = f.readline()
+ line = settings_file.readline()
if not line:
break
if re.search(r'%s' % EVENT_START, line):
# Parse event.
parsed = {}
while True:
- line = f.readline()
+ line = settings_file.readline()
if not line:
break
if re.search(r'%s' % EVENT_END, line):
@@ -136,9 +136,9 @@ def ParseSetting(filename, setting):
settings.append(s)
break
- TryFindMetric(parsed, line, f)
+ TryFindMetric(parsed, line, settings_file)
- f.close()
+ settings_file.close()
return settings
@@ -181,16 +181,16 @@ def ParseMetrics(filename, setting1, setting2):
metrics = {}
# Parse events.
- f = open(filename)
+ settings_file = open(filename)
while True:
- line = f.readline()
+ line = settings_file.readline()
if not line:
break
if re.search(r'%s' % EVENT_START, line):
# Parse event.
parsed = {}
while True:
- line = f.readline()
+ line = settings_file.readline()
if not line:
break
if re.search(r'%s' % EVENT_END, line):
@@ -209,13 +209,13 @@ def ParseMetrics(filename, setting1, setting2):
break
- TryFindMetric(parsed, line, f)
+ TryFindMetric(parsed, line, settings_file)
- f.close()
+ settings_file.close()
return metrics
-def TryFindMetric(parsed, line, f):
+def TryFindMetric(parsed, line, settings_file):
for metric in METRICS_TO_PARSE:
name = metric[0]
label = metric[1]
@@ -224,13 +224,13 @@ def TryFindMetric(parsed, line, f):
if not found:
# TODO(asapersson): Change format.
# Try find min, max, average stats.
- found, minimum = GetMetric("Min", f.readline())
+ found, minimum = GetMetric("Min", settings_file.readline())
if not found:
return
- found, maximum = GetMetric("Max", f.readline())
+ found, maximum = GetMetric("Max", settings_file.readline())
if not found:
return
- found, average = GetMetric("Average", f.readline())
+ found, average = GetMetric("Average", settings_file.readline())
if not found:
return
« no previous file with comments | « webrtc/modules/remote_bitrate_estimator/test/plot_dynamics.py ('k') | webrtc/tools/py_event_log_analyzer/misc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698