Commit graph

36 commits

Author SHA1 Message Date
Vlad Filippov
23c9f0eef2
Fix contributing.md link in the rendering benchmark (#47303)
Fixes a 404 issue with the docs
2023-03-19 23:49:49 +00:00
Rinku Chaudhari
dff39acc30
fix typo in comment and unused variable remove (#45307)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-02-02 14:55:23 -08:00
Jimmy Lai
2c23da077f
misc: fix benchmark script (#44592)
Fixing + doing some maintenance as I was using it for some things.

Changes:
- fixed a bug related to how React is injected
- added a progress tracker for the numbers of requests
- retry on 500
- added a param for crashing the lambda manually (useful for cold boots)
- added a param to skip build, useful if you want to retest the same variation
- don't crash when there's no data to compare

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2023-01-05 13:46:41 +00:00
Tim Neutkens
14c9376899
BREAKING CHANGE: Remove React 17 (#41629)
Next.js 13 will require React 18.

In this PR I've only updated the peerDependency and removed the test runs in GH actions. Further cleanup will follow later, this allows us to remove the code supporting it later.



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)


Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2022-10-21 22:20:36 +00:00
Jimmy Lai
c6a8675c35
misc: add minimal server bench setup (#41328)
This PR adds a script to run a minimal Next server in order to reproduce more easily the cold boot conditions in production.

You can use it by using `pnpm start` after having built your app with `pnpm next-react-exp build bench/minimal-server/benchmar-app` from the root of this repo.

<img width="338" alt="image" src="https://user-images.githubusercontent.com/11064311/195102966-6997b957-1e6b-433f-b611-e0eaec9462fa.png">

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
2022-10-11 15:53:26 +00:00
Jimmy Lai
6be2868787
misc: add benchmarking script for edge rendering (#40716)
This PR adds the benchmarking script I've been using for #40251 to
measure the performance improvements that we make to the Edge SSR
runtime.

This tool:
- uploads two version of the benchmarking project to Vercel, one with
the latest canary and the one with your current local changes in dist
(don't forget to build!)
- runs some tests against the published url to measure TTFB
- displays a nice chart and table

What this doesn't do (yet):

- allow you to choose which URL to compare
- allow you to change the measured metric
- run a battery of differnet test


## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`


https://user-images.githubusercontent.com/11064311/191270204-04447e20-5a40-43a9-bcda-b7eaeb3d270a.mov


## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-09-27 17:57:16 +02:00
Balázs Orbán
3ff21ed178
refactor: split up CONTRIBUTING.md (#40515)
Continues #39778

Closes #40499

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-09-16 14:54:58 -07:00
7iomka
7b91a1c156
Update of @babel/core (#37145)
Update of @babel/core to fix Type-only import specifiers issue


Fixes [#37016](https://github.com/vercel/next.js/issues/37016)


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-05-31 01:00:12 +00:00
JJ Kasper
bbcfc0d2f4
Ensure all bench dependencies are added (#37278)
* Ensure all bench dependencies are added

* bump

* another dep

* add env
2022-05-29 12:17:42 -05:00
LongYinan
6577b2efc2
Send build trace to datadog in CI (#35306)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2022-03-31 14:37:59 +02:00
hiro
a00268e70f
Fix typos (#35683)
* fix(typo): wolrd -> world

* fix(typo): _lineNumer -> _lineNumber

* fix(typo): Dyanmic -> Dynamic

* fix(typo): mutliple -> multiple

* fix(typo): dyanmic -> dynamic

* fix(typo): speical -> special

* fix(typo): acceptible -> acceptable

* fix(typo): dyanmic -> dynamic

* fix(typo): nonexistant -> nonexistent

* fix(typo): nonexistant -> nonexistent

* fix(typo): nonexistant -> nonexistent

* fix(typo): nonexistant -> nonexistent

* fix(typo): nonexistant -> nonexistent

* fix(typo): nonexistant -> nonexistent

* fix(typo): accesible -> accessible

* fix(typo): explicitely -> explicitly
2022-03-28 22:53:51 -05:00
Tobias Koppers
b79591cdaf
simplify output messages (#31454)
remove all `client/server/middleware only` messages and show `client and server` instead only when both compilers has been used.
2021-11-16 15:57:30 +00:00
Tobias Koppers
9e03c8d4ed
improve windows support for benchmark (#31032) 2021-11-08 11:39:39 +01:00
Tim Neutkens
632993068c
Add automated bench script for nested-deps (#29583)
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-10-06 13:23:32 +02:00
Tim Neutkens
bc66f55dbd
Remove unsafeCache from benchmark + use cross-env for benchmark (#29425)
Fixes from @sokra's review of #29325



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-09-27 14:03:38 +00:00
Tim Neutkens
3375e66324
Additional bench tracing improvements (#29325) 2021-09-27 12:57:37 +02:00
Tim Neutkens
1f788b5430
Development tracing improvements (#29076) 2021-09-15 20:06:24 +02:00
Tim Neutkens
c1e5f5b260
Make traces in development reliable (#28990)
Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2021-09-13 15:49:29 +02:00
matamatanot
c922c6a3f4
Replace 'require' with 'import' in bench files and update dependancies (#25775)
## Feature

- [ ] Telemetry added. In case of a feature if it's used or not.

### Replace 'require' with 'import' in bench files
Node.js 12 allows you to use `import`.

### Update dependancies
https://github.com/jprichardson/node-fs-extra/blob/master/CHANGELOG.md#breaking-changes

> Require Node.js v12+

For #25761, Node.js 12 is required. Therefore, there is no problem updating it. For benchmarking purposes, it would be reasonable to update to the latest version.
2021-06-04 14:30:52 +00:00
Dale Bustad
e27b7e996d
Telemetry-compatible tracing (#22713)
A number of changes here.  I recommend viewing the diff with the <a href="?w=1">whitespace flag enabled</a>.

- OpenTelemetry is replaced with a custom and lightweight tracing solution.
- Three trace targets are currently supported: console, Zipkin, and NextJS.
- Tracing is now governed by environment variables rather than `--require instrument.js`.
  + `TRACE_TARGET`: one of `CONSOLE`, `ZIPKIN`, or `TELEMETRY`; defaults to `TELEMETRY` if unset or invalid.
  + `TRACE_ID`: an 8-byte hex-encoded value used as the Zipkin trace ID; if not provided, this value will be randomly generated and passed down to subprocesses.

Other sundry:

- I'm missing something, probably a setup step, with the Zipkin target.  Traces are captured successfully, but you have to manually enter the Trace ID in order to view the trace - it doesn't show up in queries.
- I'm generally unhappy with [this commit](235cedcb3e).  It is... untidy to provide a telemetry object via `setGlobal`, but I don't have a ready alternative.  Is `distDir` strictly required when creating a new Telemetry object?  I didn't dig too deep here.

As noted, there are a lot of changes, so it'd be great if a reviewer could:

- [ ] pull down the branch and try to break it
- [ ] check the Zipkin traces and identify possible regressions in the functionality

Closes #22570
Fixes #22574
2021-03-10 21:00:20 +00:00
Dale Bustad
5c24670227
Add Zipkin trace capturing with output to JSON. (#22106)
@timneutkens this adds a trace capturing script alongside the other tracing sundry.  This will be utilized by the performance automation.  Additionally, its nice to have an option other than running the ZipKin JAR to get at the raw data.
2021-02-12 09:10:07 +00:00
Tim Neutkens
90ad2cbc44
Update profiling approach to cover webpack runs (#20900) 2021-01-09 20:12:13 -05:00
Tim Neutkens
a9f1975738
Update experimental profiling (#20357)
Adds profiling for terser and css-minimizer. Will move the old profiler to this new system as well.
2020-12-21 16:02:41 +00:00
Joe Haddad
86160a5190
Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
Joe Haddad
18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00
Luc
3b5f18495b Replace recursive-copy with own implementation (#7263)
* replace recursive-copy with own implementation

* update yarn.lock

* do not filter out not directories

* do not fail if folder already exists

* replace `\` by `/` when sending pathes to filter

* use fs-extra only in tests

* investigate and test recursive-copy npm module

* improve test by creating fixtures programmatically

* remove recursive-copy npm module test

* add recursive-copy to bench

* add bench:recursive-copy script

* fix Sema import in recursive-copy.ts

* small improvements
2019-06-06 12:33:11 +02:00
Joe Haddad
b3170d2648
Format missed files (#7464)
* Format missed files

* Remove unnecessary rule

* Fix type error
2019-05-29 18:19:32 -07:00
Tim Neutkens
3e51ddb8af
Move syntax formatting to prettier (#7454)
* Run prettier over packages/**/*.js

* Run prettier over packages/**/*.ts

* Run prettier over examples

* Remove tslint

* Run prettier over examples

* Run prettier over all markdown files

* Run prettier over json files
2019-05-29 13:57:26 +02:00
Connor Davis
861edad459 Implement Recursive Delete (#6489)
Removes `rimraf` for a smaller custom lib

Benchmarks (in ms):
```
rimraf 1
518.536376
rimraf 2
416.112451
rimraf 3
451.905842
rimraf 4
525.117395
rimraf 5
434.230384
---- Average: 469.18ms
-----------
recursive delete 1
121.493979
recursive delete 2
130.335272
recursive delete 3
149.798316
recursive delete 4
182.184688
recursive delete 5
130.346207
--- Average: 142.83ms
```
`recursiveDelete` finishes in ~30% of the time it takes `rimraf` (3.3 times faster)
2019-03-05 14:01:42 +01:00
Connor Davis
5514949df0 Remove glob package (#6415)
We don't use a lot of the features of `glob`, so let's remove it in favor of a leaner approach using regex.

It's failing on windows and I have no idea why and don't own a windows machine 🤦🏼‍♂️

(Ignore some of the commits in here, I forgot to create the new branch before I started working)
2019-02-24 22:08:35 +01:00
Arunoda Susiripala
a9ccf1e147 Make sure benchmark runs in the production mode. 2017-10-29 04:25:32 +05:30
Tim Neutkens
ebb397975d Add benchmarks for server rendering (#1294)
* Add benchmarks for server rendering

* Remove bench from flyfile
2017-02-27 12:04:41 -08:00
Naoyuki Kanezawa
a87ef1a7af Incorporate styled-jsx (#420)
* integrate styled-jsx

* define styles of pages with styled-jsx

* bump styled-jsx

* bump styled-jsx

* error-debug: fix style

* bump styled-jsx

* fix examples to use styled-jsx

* bump styled-jsx
2016-12-19 10:42:19 -08:00
Dan Zajdband
e164074f8e Added glamor css (#38)
* Added glamor css

* Using pseudoclasses instead of calling functions

* Updated readme using style instead of default import for css
2016-10-21 09:39:20 -07:00
Dan Zajdband
1477734211 Added linting using standard (#27)
* Added linting using standard

* Linting on test
2016-10-16 17:00:17 -07:00
Dan Zajdband
7a379ac25e Added benchmark suite 2016-10-13 16:01:11 -04:00