aboutsummaryrefslogtreecommitdiff
path: root/crosperf/results_organizer.py
diff options
context:
space:
mode:
authorYunlian Jiang <yunlian@google.com>2015-12-10 09:54:15 -0800
committerchrome-bot <chrome-bot@chromium.org>2015-12-10 19:48:51 +0000
commit1974c70a4e0b161a18a843229fc1af8344e11600 (patch)
tree8aaa0a47a71ae5a59fde5fbd1c69db4f6e9d2000 /crosperf/results_organizer.py
parent6e8726de19436e28c4d22c3f3dc3bbae87dd4c12 (diff)
downloadtoolchain-utils-1974c70a4e0b161a18a843229fc1af8344e11600.tar.gz
crosperf: clean results_organizer.py
BUG=chromium:567921 TEST=it is lint clean now. Change-Id: I0cf9445f5db822462c53d75a138e984070319714 Reviewed-on: https://chrome-internal-review.googlesource.com/241429 Commit-Ready: Yunlian Jiang <yunlian@google.com> Tested-by: Yunlian Jiang <yunlian@google.com> Reviewed-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'crosperf/results_organizer.py')
-rw-r--r--crosperf/results_organizer.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/crosperf/results_organizer.py b/crosperf/results_organizer.py
index 7dfbbdb5..efd70c63 100644
--- a/crosperf/results_organizer.py
+++ b/crosperf/results_organizer.py
@@ -1,5 +1,3 @@
-#!/usr/bin/python
-
# Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -13,7 +11,7 @@ import os
import re
import sys
-from utils import misc
+from cros_utils import misc
TELEMETRY_RESULT_DEFAULTS_FILE = "default-telemetry-results.json"
@@ -64,7 +62,7 @@ class ResultOrganizer(object):
if not show_all_results:
summary_list = self._GetSummaryResults(benchmark.test_name)
if len(summary_list) > 0:
- summary_list.append ("retval")
+ summary_list.append("retval")
else:
# Did not find test_name in json file; therefore show everything.
show_all_results = True
@@ -86,10 +84,10 @@ class ResultOrganizer(object):
cur_dict['machine_string'] = benchmark_run.machine.checksum_string
self._DuplicatePass()
- def _GetSummaryResults (self, test_name):
+ def _GetSummaryResults(self, test_name):
dirname, _ = misc.GetRoot(sys.argv[0])
fullname = os.path.join(dirname, TELEMETRY_RESULT_DEFAULTS_FILE)
- if os.path.exists (fullname):
+ if os.path.exists(fullname):
# Slurp the file into a dictionary. The keys in the dictionary are
# the benchmark names. The value for a key is a list containing the
# names of all the result fields that should be returned in a 'default'
@@ -129,7 +127,7 @@ class ResultOrganizer(object):
for run in label:
start_index = len(new_label)
new_label.append(dict(run))
- for i in range(max_dup):
+ for _ in range(max_dup):
new_label.append({})
new_run = new_label[start_index]
for key, value in new_run.items():