From fc81ecaa4e4b2b0b0b94dfb9337aad5866569726 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Thu, 1 Nov 2018 12:21:55 -0700 Subject: [PATCH] Update benchmark running instructions. (#9621) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add some details on how to run the benchmarks (create-pages, and markdown). I was looking for performance comparisons for a node optimization and it was not initially obvious how to run it. I since figured it out. Here for example is a 3% performance improvement through the optimization in node. NEW ``` success Building static HTML for pages — 0.613 s — 5001/5001 10403.89 pages/second info Done building in 10.092 sec ``` OLD ``` success Building static HTML for pages — 0.631 s — 5001/5001 10071.25 pages/second info Done building in 10.353 sec ``` --- benchmarks/create-pages/README.md | 7 +++++++ benchmarks/markdown/README.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/benchmarks/create-pages/README.md b/benchmarks/create-pages/README.md index 6bcb9451f22d7..14df26a0a0b2f 100644 --- a/benchmarks/create-pages/README.md +++ b/benchmarks/create-pages/README.md @@ -3,3 +3,10 @@ Stress tests creating lots of tiny pages. Defaults to building a site with 5k pages. Set the `NUM_PAGES` environment variable to change that e.g. `NUM_PAGES=25000 gatsby build` + +# Running the benchmark +First install node modules required by package.json. This is needed only one time. Then run the build +```bash +npm install +npm run build +``` diff --git a/benchmarks/markdown/README.md b/benchmarks/markdown/README.md index 2f01368d2d624..bd2643a387ab6 100644 --- a/benchmarks/markdown/README.md +++ b/benchmarks/markdown/README.md @@ -3,3 +3,10 @@ Stress tests creating lots of pages rendered from Markdown. Defaults to building a site with 5k markdown pages. Set the `NUM_PAGES` environment variable to change that e.g. `NUM_PAGES=25000 gatsby build` + +# Running the benchmark +First install node modules required by package.json. This is needed only one time. Then run the build +```bash +npm install +npm run build +```