From 03535882da99a22c7cd5b5f9bd5e241b83c43064 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 24 Aug 2020 17:36:56 +0800 Subject: [PATCH 1/4] Build: Add CRA benchmark --- scripts/run-e2e-config.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/run-e2e-config.ts b/scripts/run-e2e-config.ts index 944cecc07f47..50f3fc9cfa4a 100644 --- a/scripts/run-e2e-config.ts +++ b/scripts/run-e2e-config.ts @@ -197,3 +197,13 @@ export const react_in_yarn_workspace: Parameters = { `yarn add react react-dom --silent -W`, ].join(' && '), }; + +export const cra_bench: Parameters = { + name: 'cra_bench', + version: 'latest', + generator: [ + 'npx create-react-app@{{version}} {{name}}-{{version}}', + 'cd {{name}}-{{version}}', + "npx @storybook/bench 'npx sb init'", + ].join(' && '), +}; From da2b4046929b57d5f615b40837de1c2d5a774c98 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 24 Aug 2020 18:54:47 +0800 Subject: [PATCH 2/4] Install benchmark from npm --- scripts/verdaccio.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/verdaccio.yaml b/scripts/verdaccio.yaml index 7d99e4ec4452..8a3fae2b6088 100644 --- a/scripts/verdaccio.yaml +++ b/scripts/verdaccio.yaml @@ -43,6 +43,14 @@ packages: access: $all publish: $all proxy: npmjs + '@storybook/bench': + access: $all + publish: $all + proxy: npmjs + '@storybook/addon-bench': + access: $all + publish: $all + proxy: npmjs # storybook packages are NOT proxied to global registry # allowing us to republish any version during tests From 23cd366ddca4ae081b38ceaf3a4b356bec181a55 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Sun, 30 Aug 2020 09:20:14 +0800 Subject: [PATCH 3/4] Upload benchmark results --- scripts/run-e2e-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/run-e2e-config.ts b/scripts/run-e2e-config.ts index 50f3fc9cfa4a..a38012f194b9 100644 --- a/scripts/run-e2e-config.ts +++ b/scripts/run-e2e-config.ts @@ -204,6 +204,6 @@ export const cra_bench: Parameters = { generator: [ 'npx create-react-app@{{version}} {{name}}-{{version}}', 'cd {{name}}-{{version}}', - "npx @storybook/bench 'npx sb init'", + "npx @storybook/bench 'npx sb init' --upload cra", ].join(' && '), }; From d463e2074879cb44553f26f4a3b34ec1b0751c6e Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 31 Aug 2020 18:33:41 +0800 Subject: [PATCH 4/4] Benchmark upload via SB_BENCH_UPLOAD --- scripts/run-e2e-config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/run-e2e-config.ts b/scripts/run-e2e-config.ts index a38012f194b9..ffa4d0ab747d 100644 --- a/scripts/run-e2e-config.ts +++ b/scripts/run-e2e-config.ts @@ -198,12 +198,13 @@ export const react_in_yarn_workspace: Parameters = { ].join(' && '), }; +// View results at: https://datastudio.google.com/reporting/c34f64ee-400f-4d06-ad4f-5c2133e226da export const cra_bench: Parameters = { name: 'cra_bench', version: 'latest', generator: [ 'npx create-react-app@{{version}} {{name}}-{{version}}', 'cd {{name}}-{{version}}', - "npx @storybook/bench 'npx sb init' --upload cra", + "npx @storybook/bench 'npx sb init' --label cra", ].join(' && '), };