summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-10-10 19:02:54 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-10 19:02:54 +0000
commit7348681933306c3b407cb3756ce4f01782791fb6 (patch)
tree3e5f9a789e1baf649a4d09a7133e99ace610cd6b
parentf0b7d5960d6c0bab6c4d8126be296b39f21c3134 (diff)
downloadpdfium-7348681933306c3b407cb3756ce4f01782791fb6.tar.xz
Document image comparison with safetynet_compare.py.chromium/3577
Change-Id: I12a0bb92031173209b71a5ea5e06bff64a5d80a0 Reviewed-on: https://pdfium-review.googlesource.com/c/43730 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
-rw-r--r--docs/safetynet.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/safetynet.md b/docs/safetynet.md
index 5dc482b420..bd0a791bf3 100644
--- a/docs/safetynet.md
+++ b/docs/safetynet.md
@@ -119,6 +119,11 @@ One advantage is that callgrind can generate `callgrind.out` files (by passing
can be analyzed to find the cause of a regression. KCachegrind is a good
visualizer for these files.
+#### none
+
+Run without any profiler, giving a performance score of 1 always. useful for
+running image comparisons or debugging the script.
+
### Common Options
Arguments commonly passed to safetynet_compare.py.
@@ -181,3 +186,21 @@ The first time the job runs, it will just create a checkpoint as
`~/job_results/last_revision_covered`. From then on, since a checkpoint is
available, each run will compare performance with the last checkpoint and update
the checkpoint.
+
+## Run image comparison
+
+Pass the `--png-dir` option pointing at an output directory to compare the output
+images from rendering the "before" and the "after" branches with pdfium_test.
+
+```shell
+$ mkdir ~/output_images
+$ testing/tools/safetynet_compare.py ~/pdf_samples --branch-before before_visual_changes --branch-after after_visual_changes --png-dir ~/output_images
+```
+
+This will output and automatically open a `~/output_images/compare.html` file
+showing the before/after and the diff. Hover the mouse cursor over the
+before/after image on the left for an easier visual comparison. The "before"
+image is displayed until the cursor hovers over the image, which is then
+replaced with the "after" image.
+
+It is recommended to use `--profiler=none` with this option.