diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-05-09 21:37:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-09 21:37:42 +0000 |
commit | 52489ee8114cf476342231be610e75b324290920 (patch) | |
tree | 186112625fbab0dfbfaad1442817b09b806bb54f /testing/tools/safetynet_measure.py | |
parent | 81981300c2892598784f8b7096d5143ac04293a7 (diff) | |
download | pdfium-52489ee8114cf476342231be610e75b324290920.tar.xz |
safetynet_compare.py generates pngs to compare visually
Change-Id: Ief6853cbfdb5dca0c81d76978075a2fd04989f41
Reviewed-on: https://pdfium-review.googlesource.com/8830
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'testing/tools/safetynet_measure.py')
-rwxr-xr-x | testing/tools/safetynet_measure.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testing/tools/safetynet_measure.py b/testing/tools/safetynet_measure.py index 7b5bd5fe9d..ac362b2cef 100755 --- a/testing/tools/safetynet_measure.py +++ b/testing/tools/safetynet_measure.py @@ -105,8 +105,14 @@ class PerformanceRun(object): def _BuildTestHarnessCommand(self): """Builds command to run the test harness.""" cmd = [self.pdfium_test_path, '--send-events'] + if self.args.interesting_section: cmd.append('--callgrind-delim') + if self.args.png: + cmd.append('--png') + if self.args.pages: + cmd.append('--pages=%s' % self.args.pages) + cmd.append(self.args.pdf_path) return cmd @@ -140,6 +146,14 @@ def main(): 'Limiting to only the interesting section does not ' 'work on Release since the delimiters are optimized ' 'out. Callgrind only.') + parser.add_argument('--png', action='store_true', + help='outputs a png image on the same location as the ' + 'pdf file') + parser.add_argument('--pages', + help='selects some pages to be rendered. Page numbers ' + 'are 0-based. "--pages A" will render only page A. ' + '"--pages A-B" will render pages A to B ' + '(inclusive).') parser.add_argument('--output-path', help='where to write the profile data output file') args = parser.parse_args() |