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

Unified Diff: gm/rebaseline_server/server.py

Issue 379563005: rebaseline_server: cache results in long-running ImageDiffDB instance (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Ravi comment Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/rebaseline_server/imagediffdb.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/server.py
diff --git a/gm/rebaseline_server/server.py b/gm/rebaseline_server/server.py
index ee4d299a3d2adb7cbfddd34bc80eafd3def01acf..e82ecf2049df2dd37e2c8efc72a68cb14b471470 100755
--- a/gm/rebaseline_server/server.py
+++ b/gm/rebaseline_server/server.py
@@ -44,6 +44,7 @@ import gm_json
import compare_configs
import compare_to_expectations
import download_actuals
+import imagediffdb
import imagepairset
import results as results_mod
@@ -233,8 +234,10 @@ class Server(object):
# 1. self._results
# 2. the expected or actual results on local disk
self.results_rlock = threading.RLock()
- # self._results will be filled in by calls to update_results()
+
+ # These will be filled in by calls to update_results()
self._results = None
+ self._image_diff_db = None
@property
def results(self):
@@ -341,11 +344,15 @@ class Server(object):
compare_to_expectations.DEFAULT_EXPECTATIONS_DIR)
_run_command(['gclient', 'sync'], TRUNK_DIRECTORY)
+ if not self._image_diff_db:
+ self._image_diff_db = imagediffdb.ImageDiffDB(
+ storage_root=os.path.join(
+ PARENT_DIRECTORY, STATIC_CONTENTS_SUBDIR,
+ GENERATED_IMAGES_SUBDIR))
+
self._results = compare_to_expectations.ExpectationComparisons(
+ image_diff_db=self._image_diff_db,
actuals_root=self._actuals_dir,
- generated_images_root=os.path.join(
- PARENT_DIRECTORY, STATIC_CONTENTS_SUBDIR,
- GENERATED_IMAGES_SUBDIR),
diff_base_url=posixpath.join(
os.pardir, STATIC_CONTENTS_SUBDIR, GENERATED_IMAGES_SUBDIR),
builder_regex_list=self._builder_regex_list)
« no previous file with comments | « gm/rebaseline_server/imagediffdb.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698