From 38936d6a704e0a74bafb865eb69fd0bd89dfb572 Mon Sep 17 00:00:00 2001 From: Tim van der Meij Date: Thu, 12 Jun 2014 12:37:38 -0700 Subject: [PATCH] Wiki page to document statcmp.js --- Benchmarking-your-changes.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Benchmarking-your-changes.md diff --git a/Benchmarking-your-changes.md b/Benchmarking-your-changes.md new file mode 100644 index 0000000..2558986 --- /dev/null +++ b/Benchmarking-your-changes.md @@ -0,0 +1,16 @@ +When working on issues related to performance, it is important to provide a performance benchmark for your changes to assess whether or not your change has a performance impact. PDF.js provides tools to do this easily. + +Run the following command to create a 'baseline' measurement (before you make your changes): + + cd test + node test.js --browserManifestFile=resources/browser_manifests/browser_manifest.json --statsFile=stats/results/baseline.json + +Then apply your changes and create a 'current' measurement: + + node test.js --browserManifestFile=resources/browser_manifests/browser_manifest.json --statsFile=stats/results/current.json + +Now you can compare the measurements and see any performance differences: + + node stats/statcmp.js stats/results/baseline.json stats/results/current.json + +As a sanity check, you should do this twice with the same code and compare the results. \ No newline at end of file