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

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

Issue 235923002: rebaseline_server: multithreaded loading/diffing of images (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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') | gm/rebaseline_server/imagediffdb.py » ('J')
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 2013 Google Inc. 4 Copyright 2013 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 Repackage expected/actual GM results as needed by our HTML rebaseline viewer. 9 Repackage expected/actual GM results as needed by our HTML rebaseline viewer.
10 """ 10 """
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 if builder_regex_list != None: 82 if builder_regex_list != None:
83 self.set_match_builders_pattern_list(builder_regex_list) 83 self.set_match_builders_pattern_list(builder_regex_list)
84 self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root) 84 self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
85 self._diff_base_url = ( 85 self._diff_base_url = (
86 diff_base_url or 86 diff_base_url or
87 download_actuals.create_filepath_url(generated_images_root)) 87 download_actuals.create_filepath_url(generated_images_root))
88 self._actuals_root = actuals_root 88 self._actuals_root = actuals_root
89 self._expected_root = expected_root 89 self._expected_root = expected_root
90 self._load_actual_and_expected() 90 self._load_actual_and_expected()
91 self._timestamp = int(time.time()) 91 self._timestamp = int(time.time())
92 logging.info('Number of download file collisions: %s' %
93 imagediffdb.global_file_collisions)
92 logging.info('Results complete; took %d seconds.' % 94 logging.info('Results complete; took %d seconds.' %
93 (self._timestamp - time_start)) 95 (self._timestamp - time_start))
94 96
95 def edit_expectations(self, modifications): 97 def edit_expectations(self, modifications):
96 """Edit the expectations stored within this object and write them back 98 """Edit the expectations stored within this object and write them back
97 to disk. 99 to disk.
98 100
99 Note that this will NOT update the results stored in self._results[] ; 101 Note that this will NOT update the results stored in self._results[] ;
100 in order to see those updates, you must instantiate a new 102 in order to see those updates, you must instantiate a new
101 ExpectationComparisons object based on the (now updated) files on disk. 103 ExpectationComparisons object based on the (now updated) files on disk.
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 results_obj = ExpectationComparisons(actuals_root=args.actuals, 368 results_obj = ExpectationComparisons(actuals_root=args.actuals,
367 expected_root=args.expectations, 369 expected_root=args.expectations,
368 generated_images_root=args.workdir) 370 generated_images_root=args.workdir)
369 gm_json.WriteToFile( 371 gm_json.WriteToFile(
370 results_obj.get_packaged_results_of_type(results_type=args.results), 372 results_obj.get_packaged_results_of_type(results_type=args.results),
371 args.outfile) 373 args.outfile)
372 374
373 375
374 if __name__ == '__main__': 376 if __name__ == '__main__':
375 main() 377 main()
OLDNEW
« no previous file with comments | « no previous file | gm/rebaseline_server/imagediffdb.py » ('j') | gm/rebaseline_server/imagediffdb.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698