From 52489ee8114cf476342231be610e75b324290920 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Wed, 9 May 2018 21:37:42 +0000 Subject: safetynet_compare.py generates pngs to compare visually Change-Id: Ief6853cbfdb5dca0c81d76978075a2fd04989f41 Reviewed-on: https://pdfium-review.googlesource.com/8830 Reviewed-by: dsinclair Commit-Queue: Henrique Nakashima --- testing/tools/safetynet_measure.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'testing/tools/safetynet_measure.py') 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() -- cgit v1.2.3