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

Unified Diff: media/tools/layout_tests/trend_graph.py

Issue 7778048: Add README file and parametrize result directory in layout test analzyer tool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modify comments in trend_graph.py based on CR comments. Created 9 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 | « media/tools/layout_tests/layouttest_analyzer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/layout_tests/trend_graph.py
diff --git a/media/tools/layout_tests/trend_graph.py b/media/tools/layout_tests/trend_graph.py
index c39fff88343d3e8e347d454a74465fc5b11a2dbf..8c34022bf90d0f6ff2094575b2aeb0df1963a3a3 100644
--- a/media/tools/layout_tests/trend_graph.py
+++ b/media/tools/layout_tests/trend_graph.py
@@ -39,12 +39,22 @@ class TrendGraph(object):
other is for passing rates).
Args:
- datetime_string: a datetime string (e.g., '2008,1,1,13,45,00)'
+ datetime_string: a datetime string delimited by ','
+ (e.g., '2008,1,1,13,45,00)'. For example, in the case of the year
+ 2008, this ranges from '2008,1,1,0,0,00' to '2008,12,31,23,59,99'.
data_map: a dictionary containing 'whole', 'skip' , 'nonskip',
'passingrate' as its keys and (number, tile, text) string tuples
as values for graph annotation.
"""
joined_str = ''
+ # For a date format in GViz, month is shifted (e.g., '2008,2,1' means
+ # March 1, 2008). So, the input parameter |datetime_string| (before this
+ # conversion) must be shifted in order to show the date properly on GViz.
+ # After the below conversion, for example, in the case of the year 2008,
+ # |datetime_string| ranges from '2008,0,1,0,0,00' to '2008,11,31,23,59,99'.
+ str_list = datetime_string.split(',')
+ str_list[1] = str(int(str_list[1])-1) # month
+ datetime_string = ','.join(str_list)
for key in ['whole', 'skip', 'nonskip']:
joined_str += ','.join(data_map[key]) + ','
new_line_for_numbers = ' [new Date(%s),%s],\n' % (datetime_string,
« no previous file with comments | « media/tools/layout_tests/layouttest_analyzer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698