Skip to content

Commit

Permalink
Update benchmark running instructions. (#9621)
Browse files Browse the repository at this point in the history
<!--
  Q. Which branch should I use for my pull request?
  A. Use `master` branch (probably).

  Q. Which branch if my change is a bug fix for Gatsby v1?
  A. In this case, you should use the `v1` branch

  Q. Which branch if I'm still not sure?
  A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :)

  Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2.

  Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/
-->

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
```
  • Loading branch information
suresh-srinivas authored and DSchau committed Nov 1, 2018
1 parent ec6df74 commit fc81eca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions benchmarks/create-pages/README.md
Expand Up @@ -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
```
7 changes: 7 additions & 0 deletions benchmarks/markdown/README.md
Expand Up @@ -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
```

0 comments on commit fc81eca

Please sign in to comment.