Skip to content

Commit e0fbc7c

Browse files
committed
Add check startup docs
1 parent 7d4de67 commit e0fbc7c

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/content/docs/workers/platform/limits.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,8 @@ You can measure your Worker's startup time by deploying it to Cloudflare using [
272272

273273
If you are having trouble staying under this limit, consider [profiling using DevTools](/workers/observability/dev-tools/) locally to learn how to optimize your code.
274274

275+
When a Worker deployment fails with a startup time error Wrangler will automatically generate a CPU profile for easy investigation, This can be imported into Chrome DevTools or opened directly in VSCode. Refer to [`wrangler check startup`](/workers/wrangler/commands/#startup) for more details.
276+
275277
<Render file="limits_increase" />
276278

277279
---

src/content/docs/workers/wrangler/commands.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Wrangler offers a number of commands to manage your Cloudflare Workers.
4848
- [`cert`](#cert) - Manage certificates used for mTLS and Certificate Authority (CA) chain connections.
4949
- [`types`](#types) - Generate types from bindings and module rules in configuration.
5050
- [`telemetry`](#telemetry) - Configure whether Wrangler can collect anonymous usage data.
51+
- [`check`](#check) - Validate your Worker.
5152

5253
:::note
5354

@@ -1962,3 +1963,26 @@ This will resolve the global status set by `wrangler telemetry disable / enable`
19621963
```txt
19631964
wrangler telemetry status
19641965
```
1966+
1967+
<Render file="wrangler-commands/global-flags" product="workers" />
1968+
1969+
---
1970+
1971+
## `check`
1972+
1973+
### `startup`
1974+
1975+
Generate a CPU profile of your Worker's startup phase.
1976+
1977+
This can be imported into Chrome DevTools or opened directly in VSCode to view a flamegraph of your Worker's startup phase. Additionally, when a Worker deployment fails with a startup time error Wrangler will automatically generate a CPU profile for easy investigation.
1978+
1979+
```sh
1980+
wrangler check startup
1981+
```
1982+
1983+
- `--deploy-args` <Type text="string" /> <MetaInfo text="optional" />
1984+
- To customise the way `wrangler check startup` builds your Worker for analysis, provide the exact arguments you use when deploying your Worker with `wrangler deploy`. For instance, if you deploy your Worker with `wrangler deploy --no-bundle`, you should use `wrangler check startup --deploy-args="--no-bundle"` to profile the startup phase.
1985+
- `--worker-bundle` <Type text="string" /> <MetaInfo text="optional" />
1986+
- If you don't use Wrangler to deploy your Worker, you can use this argument to provide a Worker bundle to analyse. This should be a file path to a serialised multipart upload, with the exact same format as [the API expects](https://developers.cloudflare.com/api/resources/workers/subresources/scripts/methods/update/)
1987+
1988+
<Render file="wrangler-commands/global-flags" product="workers" />

0 commit comments

Comments
 (0)