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

Side by Side Diff: appengine/findit/model/flake/flake_swarming_task.py

Issue 2345093002: [Findit] Extending versioned_model.py to support versioning multiple entities of the same class. (Closed)
Patch Set: Ignore this patch, uploaded unrelated change to wrong branch Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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
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)
OLDNEW
« no previous file with comments | « appengine/findit/handlers/flake/test/check_flake_test.py ('k') | appengine/findit/model/flake/master_flake_analysis.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698