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

Side by Side Diff: gm/rebaseline_server/compare_rendered_pictures.py

Issue 454953002: rebaseline_server: periodically log tasks_queue size (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add a comment Created 6 years, 4 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
« no previous file with comments | « no previous file | gm/rebaseline_server/imagediffdb.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 """ 3 """
4 Copyright 2014 Google Inc. 4 Copyright 2014 Google Inc.
5 5
6 Use of this source code is governed by a BSD-style license that can be 6 Use of this source code is governed by a BSD-style license that can be
7 found in the LICENSE file. 7 found in the LICENSE file.
8 8
9 Compare results of two render_pictures runs. 9 Compare results of two render_pictures runs.
10 10
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 results.KEY__RESULT_TYPE__FAILED, 199 results.KEY__RESULT_TYPE__FAILED,
200 results.KEY__RESULT_TYPE__NOCOMPARISON, 200 results.KEY__RESULT_TYPE__NOCOMPARISON,
201 results.KEY__RESULT_TYPE__SUCCEEDED, 201 results.KEY__RESULT_TYPE__SUCCEEDED,
202 ]) 202 ])
203 failing_image_pairs.ensure_extra_column_values_in_summary( 203 failing_image_pairs.ensure_extra_column_values_in_summary(
204 column_id=COLUMN__RESULT_TYPE, values=[ 204 column_id=COLUMN__RESULT_TYPE, values=[
205 results.KEY__RESULT_TYPE__FAILED, 205 results.KEY__RESULT_TYPE__FAILED,
206 results.KEY__RESULT_TYPE__NOCOMPARISON, 206 results.KEY__RESULT_TYPE__NOCOMPARISON,
207 ]) 207 ])
208 208
209 logging.info('Starting to add imagepairs to queue.')
210 self._image_diff_db.log_queue_size_if_changed(limit_verbosity=False)
211
209 union_dict_paths = sorted(set(setA_dicts.keys() + setB_dicts.keys())) 212 union_dict_paths = sorted(set(setA_dicts.keys() + setB_dicts.keys()))
210 num_union_dict_paths = len(union_dict_paths) 213 num_union_dict_paths = len(union_dict_paths)
211 dict_num = 0 214 dict_num = 0
212 for dict_path in union_dict_paths: 215 for dict_path in union_dict_paths:
213 dict_num += 1 216 dict_num += 1
214 logging.info( 217 logging.info(
215 'Asynchronously requesting pixel diffs for dict #%d of %d, "%s"...' % 218 'Asynchronously requesting pixel diffs for dict #%d of %d, "%s"...' %
216 (dict_num, num_union_dict_paths, dict_path)) 219 (dict_num, num_union_dict_paths, dict_path))
217 220
218 dictA = self.get_default(setA_dicts, None, dict_path) 221 dictA = self.get_default(setA_dicts, None, dict_path)
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 source_skp_name=skp_name, tilenum=tile_num)) 262 source_skp_name=skp_name, tilenum=tile_num))
260 263
261 for one_imagepair in imagepairs_for_this_skp: 264 for one_imagepair in imagepairs_for_this_skp:
262 if one_imagepair: 265 if one_imagepair:
263 all_image_pairs.add_image_pair(one_imagepair) 266 all_image_pairs.add_image_pair(one_imagepair)
264 result_type = one_imagepair.extra_columns_dict\ 267 result_type = one_imagepair.extra_columns_dict\
265 [COLUMN__RESULT_TYPE] 268 [COLUMN__RESULT_TYPE]
266 if result_type != results.KEY__RESULT_TYPE__SUCCEEDED: 269 if result_type != results.KEY__RESULT_TYPE__SUCCEEDED:
267 failing_image_pairs.add_image_pair(one_imagepair) 270 failing_image_pairs.add_image_pair(one_imagepair)
268 271
272 logging.info('Finished adding imagepairs to queue.')
273 self._image_diff_db.log_queue_size_if_changed(limit_verbosity=False)
274
269 if self._prefetch_only: 275 if self._prefetch_only:
270 return None 276 return None
271 else: 277 else:
272 return { 278 return {
273 results.KEY__HEADER__RESULTS_ALL: all_image_pairs.as_dict( 279 results.KEY__HEADER__RESULTS_ALL: all_image_pairs.as_dict(
274 column_ids_in_order=ORDERED_COLUMN_IDS), 280 column_ids_in_order=ORDERED_COLUMN_IDS),
275 results.KEY__HEADER__RESULTS_FAILURES: failing_image_pairs.as_dict( 281 results.KEY__HEADER__RESULTS_FAILURES: failing_image_pairs.as_dict(
276 column_ids_in_order=ORDERED_COLUMN_IDS), 282 column_ids_in_order=ORDERED_COLUMN_IDS),
277 } 283 }
278 284
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 """ 384 """
379 if gs_utils.GSUtils.is_gs_url(source_dir): 385 if gs_utils.GSUtils.is_gs_url(source_dir):
380 (bucket, path) = gs_utils.GSUtils.split_gs_url(source_dir) 386 (bucket, path) = gs_utils.GSUtils.split_gs_url(source_dir)
381 self._gs.download_dir_contents(source_bucket=bucket, source_dir=path, 387 self._gs.download_dir_contents(source_bucket=bucket, source_dir=path,
382 dest_dir=dest_dir) 388 dest_dir=dest_dir)
383 elif source_dir.lower().startswith(REPO_URL_PREFIX): 389 elif source_dir.lower().startswith(REPO_URL_PREFIX):
384 repo_dir = os.path.join(REPO_BASEPATH, source_dir[len(REPO_URL_PREFIX):]) 390 repo_dir = os.path.join(REPO_BASEPATH, source_dir[len(REPO_URL_PREFIX):])
385 shutil.copytree(repo_dir, dest_dir) 391 shutil.copytree(repo_dir, dest_dir)
386 else: 392 else:
387 shutil.copytree(source_dir, dest_dir) 393 shutil.copytree(source_dir, dest_dir)
OLDNEW
« no previous file with comments | « no previous file | gm/rebaseline_server/imagediffdb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698