| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 base64 | 5 import base64 |
| 6 | 6 |
| 7 from google.appengine.ext import ndb | 7 from google.appengine.ext import ndb |
| 8 | 8 |
| 9 from common import constants | 9 from common import constants |
| 10 from model import analysis_status | 10 from model import analysis_status |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 return base64.urlsafe_b64decode(self.key.pairs()[0][1].split('/')[4]) | 48 return base64.urlsafe_b64decode(self.key.pairs()[0][1].split('/')[4]) |
| 49 | 49 |
| 50 | 50 |
| 51 @staticmethod | 51 @staticmethod |
| 52 def Get( | 52 def Get( |
| 53 master_name, builder_name, build_number, | 53 master_name, builder_name, build_number, |
| 54 step_name, test_name): # pragma: no cover | 54 step_name, test_name): # pragma: no cover |
| 55 return FlakeSwarmingTask._CreateKey( | 55 return FlakeSwarmingTask._CreateKey( |
| 56 master_name, builder_name, build_number, step_name, test_name).get() | 56 master_name, builder_name, build_number, step_name, test_name).get() |
| 57 | 57 |
| 58 def ResultsToDict(self): |
| 59 return { |
| 60 'created_time': self.created_time, |
| 61 'started_time': self.started_time, |
| 62 'completed_time': self.completed_time, |
| 63 'build_number': self.build_number, |
| 64 'number_of_iterations': self.tries, |
| 65 'number_of_passes': self.successes |
| 66 } |
| 67 |
| 58 # Number of runs the test passed. | 68 # Number of runs the test passed. |
| 59 successes = ndb.IntegerProperty(default=0, indexed=False) | 69 successes = ndb.IntegerProperty(default=0, indexed=False) |
| 60 # How many times the test was rerun. | 70 # How many times the test was rerun. |
| 61 tries = ndb.IntegerProperty(default=0, indexed=False) | 71 tries = ndb.IntegerProperty(default=0, indexed=False) |
| OLD | NEW |