Upload chromeOS Octane benchmark perf results to Chrome's new perf dashboard.

This CL contains 3 related changes:

1) modify croschart_defaults.json to use the new test name/perf key names
for the Telemetry Octane benchmark that's running on chromeOS.

2) modify extract_perf.py to also extract the chrome version number
associated with each perf result (which is available in the results
database).

3) modify generate_perf_graphs.py to actually upload the perf data for
a single platform/perf test (lumpy/Telemetry Octane benchmark) to Chrome's
live perf dashboard.

Once we verify things are working well on the live dashboard for this
single platform/test, we'll open it up to more platforms/tests.  In a future
CL, we'll cache results that can't be uploaded to the live dashboard
(e.g., if the live dashboard is temporarily down), so that they can be
uploaded on a later invocation of the script.

BUG=chromium:220573
TEST=Verified that extract_perf.py and generate_perf_graphs.py will properly
upload only results for Telemetry Octane benchmark on lumpy, to a local instance
of Chrome's new perf dashboard (sending the perf data to the URL
"http://localhost:8080/add_point").  The CL now uses the actual URL
of the live dashboard (which can be viewed externally).

Change-Id: I98f28d2813ba4ccd52d342db1eebddcf3eba5a85
Reviewed-on: https://gerrit.chromium.org/gerrit/49257
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Scott Zawalski <scottz@chromium.org>
Commit-Queue: Dennis Jeffrey <dennisjeffrey@chromium.org>
Tested-by: Dennis Jeffrey <dennisjeffrey@chromium.org>
diff --git a/frontend/perf-dashboard/extract_perf.py b/frontend/perf-dashboard/extract_perf.py
index 93b62ba..b5afb88 100644
--- a/frontend/perf-dashboard/extract_perf.py
+++ b/frontend/perf-dashboard/extract_perf.py
@@ -109,7 +109,8 @@
     @param output_dir: The output directory in which results are being written.
 
     """
-    result_out = [job_id, result_dict['job_name'], result_dict['platform']]
+    result_out = [job_id, result_dict['job_name'], result_dict['platform'],
+                  result_dict['chrome_version']]
     perf_items = []
     for perf_key in result_dict['perf_keys']:
         for perf_val in result_dict['perf_keys'][perf_key]:
@@ -174,6 +175,18 @@
     if 'platform' not in result:
         return False
 
+    # Get the Chrome version number associated with this job ID.
+    query = ('SELECT DISTINCT value FROM tko_test_attributes '
+             'INNER JOIN tko_perf_view_2 USING (test_idx) '
+             'INNER JOIN tko_jobs USING (job_idx) '
+             'WHERE afe_job_id=%s AND attribute="CHROME_VERSION"')
+    cursor.execute(query, job_id)
+    cursor_results = cursor.fetchall()
+    assert len(cursor_results) <= 1, \
+           'Expected the Chrome version number to be unique for afe_job_id ' \
+           '%s, but got multiple instead: %s' % (job_id, cursor_results)
+    result['chrome_version'] = cursor_results[0][0] if cursor_results else ''
+
     write_perf_info_to_disk(job_id, result, test_dir, output_dir)
     return True