| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import urllib | 5 import urllib |
| 6 | 6 |
| 7 from slave import recipe_api | 7 from recipe_engine import recipe_api |
| 8 | 8 |
| 9 class PerfDashboardApi(recipe_api.RecipeApi): | 9 class PerfDashboardApi(recipe_api.RecipeApi): |
| 10 """Provides steps to take a list of perf points and post them to the | 10 """Provides steps to take a list of perf points and post them to the |
| 11 Chromium Perf Dashboard. Can also use the test url for testing purposes.""" | 11 Chromium Perf Dashboard. Can also use the test url for testing purposes.""" |
| 12 | 12 |
| 13 def get_skeleton_point(self, test, revision, value): | 13 def get_skeleton_point(self, test, revision, value): |
| 14 # TODO: masterid is really mastername | 14 # TODO: masterid is really mastername |
| 15 assert(test != '') | 15 assert(test != '') |
| 16 assert(revision != '') | 16 assert(revision != '') |
| 17 assert(value != '') | 17 assert(value != '') |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 def post(self, data): | 62 def post(self, data): |
| 63 """Takes a data object which can be jsonified and posts it to url.""" | 63 """Takes a data object which can be jsonified and posts it to url.""" |
| 64 self.m.python( | 64 self.m.python( |
| 65 name="perf dashboard post", | 65 name="perf dashboard post", |
| 66 script=self.resource('post_json.py'), | 66 script=self.resource('post_json.py'), |
| 67 stdin=self.m.json.input({ | 67 stdin=self.m.json.input({ |
| 68 'url' : "%s/add_point" % self.c.url, | 68 'url' : "%s/add_point" % self.c.url, |
| 69 'data' : data | 69 'data' : data |
| 70 })) | 70 })) |
| OLD | NEW |