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

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

Issue 239623002: Revert of 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') | 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 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)
94 logging.info('Results complete; took %d seconds.' % 92 logging.info('Results complete; took %d seconds.' %
95 (self._timestamp - time_start)) 93 (self._timestamp - time_start))
96 94
97 def edit_expectations(self, modifications): 95 def edit_expectations(self, modifications):
98 """Edit the expectations stored within this object and write them back 96 """Edit the expectations stored within this object and write them back
99 to disk. 97 to disk.
100 98
101 Note that this will NOT update the results stored in self._results[] ; 99 Note that this will NOT update the results stored in self._results[] ;
102 in order to see those updates, you must instantiate a new 100 in order to see those updates, you must instantiate a new
103 ExpectationComparisons object based on the (now updated) files on disk. 101 ExpectationComparisons object based on the (now updated) files on disk.
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 results_obj = ExpectationComparisons(actuals_root=args.actuals, 366 results_obj = ExpectationComparisons(actuals_root=args.actuals,
369 expected_root=args.expectations, 367 expected_root=args.expectations,
370 generated_images_root=args.workdir) 368 generated_images_root=args.workdir)
371 gm_json.WriteToFile( 369 gm_json.WriteToFile(
372 results_obj.get_packaged_results_of_type(results_type=args.results), 370 results_obj.get_packaged_results_of_type(results_type=args.results),
373 args.outfile) 371 args.outfile)
374 372
375 373
376 if __name__ == '__main__': 374 if __name__ == '__main__':
377 main() 375 main()
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