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

Unified Diff: gm/rebaseline_server/results.py

Issue 82823005: rebaseline_server: improve pixel diff reporting (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: partially_deobfuscate Created 7 years, 1 month 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_test.py ('k') | gm/rebaseline_server/static/view.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/rebaseline_server/results.py
===================================================================
--- gm/rebaseline_server/results.py (revision 12361)
+++ gm/rebaseline_server/results.py (working copy)
@@ -61,7 +61,7 @@
Args:
actuals_root: root directory containing all actual-results.json files
expected_root: root directory containing all expected-results.json files
- generated_images_root: directory within which to create all pixels diffs;
+ generated_images_root: directory within which to create all pixel diffs;
if this directory does not yet exist, it will be created
"""
self._image_diff_db = imagediffdb.ImageDiffDB(generated_images_root)
@@ -400,17 +400,23 @@
if updated_result_type == gm_json.JSONKEY_ACTUALRESULTS_NOCOMPARISON:
pass # no diff record to calculate at all
elif updated_result_type == gm_json.JSONKEY_ACTUALRESULTS_SUCCEEDED:
+ results_for_this_test['numDifferingPixels'] = 0
results_for_this_test['percentDifferingPixels'] = 0
results_for_this_test['weightedDiffMeasure'] = 0
+ results_for_this_test['maxDiffPerChannel'] = 0
else:
try:
diff_record = self._image_diff_db.get_diff_record(
expected_image_locator=expected_image[1],
actual_image_locator=actual_image[1])
+ results_for_this_test['numDifferingPixels'] = (
+ diff_record.get_num_pixels_differing())
results_for_this_test['percentDifferingPixels'] = (
diff_record.get_percent_pixels_differing())
results_for_this_test['weightedDiffMeasure'] = (
diff_record.get_weighted_diff_measure())
+ results_for_this_test['maxDiffPerChannel'] = (
+ diff_record.get_max_diff_per_channel())
except KeyError:
logging.warning('unable to find diff_record for ("%s", "%s")' %
(expected_image[1], actual_image[1]))
« no previous file with comments | « gm/rebaseline_server/imagediffdb_test.py ('k') | gm/rebaseline_server/static/view.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698