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

Unified Diff: scripts/slave/process_log_utils.py

Issue 23740006: Updating endure parser to read new csv output format (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | scripts/slave/unittests/data/endure_gmail_alt_two_labels-EventListenerCount-summary.dat » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/process_log_utils.py
diff --git a/scripts/slave/process_log_utils.py b/scripts/slave/process_log_utils.py
index be9350d57564caf1ce8988682c6aa6bbbf115411..630df49d6bb3edc67287a6ed49133ca02b4383fa 100644
--- a/scripts/slave/process_log_utils.py
+++ b/scripts/slave/process_log_utils.py
@@ -838,8 +838,8 @@ class GraphingLogProcessor(PerformanceLogProcessor):
class GraphingEndureLogProcessor(GraphingLogProcessor):
"""Handles additional processing for Chrome Endure data."""
- ENDURE_HEADER_LINE_REGEX = re.compile(r'^url,')
- ENDURE_RESULT_LINE_REGEX = re.compile(r'^http')
+ ENDURE_HEADER_LINE_REGEX = re.compile(r'^url,|^page_name,')
+ ENDURE_RESULT_LINE_REGEX = re.compile(r'^http|^endure_')
ENDURE_FIELD_NAME_REGEX = re.compile(
r'(?P<TRACE>.*)_(?P<COORDINATE>[XY]) \((?P<UNITS>.*)\)')
@@ -901,7 +901,7 @@ class GraphingEndureLogProcessor(GraphingLogProcessor):
values = csv.reader([line]).next()
# Assume url is the first column.
Michael Achenbach 2013/09/06 08:34:21 nit: update comment, e.g. url -> test name
- test_name = self.url_as_file_safe_name(values[0])
+ test_name = self.str_as_file_safe_name(values[0])
# Iterate over all trace names discovered from the header.
for trace_name in self._graph_template:
@@ -921,9 +921,9 @@ class GraphingEndureLogProcessor(GraphingLogProcessor):
self._graphs[graph_name] = graph
@staticmethod
- def url_as_file_safe_name(url):
+ def str_as_file_safe_name(string):
# Just replace all special characters in the url with underscore.
Michael Achenbach 2013/09/06 08:34:21 nit: update comment: url -> str
- return re.sub('[^a-zA-Z0-9]', '_', url)
+ return re.sub('[^a-zA-Z0-9]', '_', string)
def _FinalizeProcessing(self):
self.__CreateSummaryOutput()
« no previous file with comments | « no previous file | scripts/slave/unittests/data/endure_gmail_alt_two_labels-EventListenerCount-summary.dat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698