Skip to content

Commit 815c693

Browse files
authored
docs: update Rspack profile recommended value (#5221)
1 parent e650db6 commit 815c693

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

e2e/cases/rspack-profile/index.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { exec } from 'node:child_process';
22
import fs from 'node:fs';
3-
import path from 'node:path';
43
import { stripVTControlCharacters as stripAnsi } from 'node:util';
54
import { expectPoll, rspackOnlyTest } from '@e2e/helper';
65
import { expect } from '@playwright/test';
@@ -12,7 +11,7 @@ rspackOnlyTest(
1211
cwd: __dirname,
1312
env: {
1413
...process.env,
15-
RSPACK_PROFILE: 'ALL',
14+
RSPACK_PROFILE: 'OVERVIEW',
1615
},
1716
});
1817

@@ -50,7 +49,7 @@ rspackOnlyTest(
5049
cwd: __dirname,
5150
env: {
5251
...process.env,
53-
RSPACK_PROFILE: 'ALL',
52+
RSPACK_PROFILE: 'OVERVIEW',
5453
},
5554
});
5655

packages/core/src/plugins/rspackProfile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ async function ensureFileDir(outputFilePath: string) {
3030
}
3131

3232
/**
33-
* `RSPACK_PROFILE=ALL` overview trace events
34-
* `RSPACK_PROFILE=OVERVIEW` // all trace event
33+
* `RSPACK_PROFILE=ALL` // all trace events
34+
* `RSPACK_PROFILE=OVERVIEW` // overview trace events
3535
* `RSPACK_PROFILE=warn,tokio::net=info` // trace filter from https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#example-syntax
3636
*/
3737
async function applyProfile(

website/docs/en/guide/debug/build-profiling.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Rsbuild supports the use of the `RSPACK_PROFILE` environment variable for Rspack
4242
```json title="package.json"
4343
{
4444
"scripts": {
45-
"dev:profile": "RSPACK_PROFILE=ALL rsbuild dev",
46-
"build:profile": "RSPACK_PROFILE=ALL rsbuild build"
45+
"dev:profile": "RSPACK_PROFILE=OVERVIEW rsbuild dev",
46+
"build:profile": "RSPACK_PROFILE=OVERVIEW rsbuild build"
4747
}
4848
}
4949
```
@@ -53,8 +53,8 @@ As Windows does not support the above usage, you can also use [cross-env](https:
5353
```json title="package.json"
5454
{
5555
"scripts": {
56-
"dev:profile": "cross-env RSPACK_PROFILE=ALL rsbuild dev",
57-
"build:profile": "cross-env RSPACK_PROFILE=ALL rsbuild build"
56+
"dev:profile": "cross-env RSPACK_PROFILE=OVERVIEW rsbuild dev",
57+
"build:profile": "cross-env RSPACK_PROFILE=OVERVIEW rsbuild build"
5858
},
5959
"devDependencies": {
6060
"cross-env": "^7.0.0"

website/docs/zh/guide/debug/build-profiling.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Rsbuild 支持使用 `RSPACK_PROFILE` 环境变量来对 Rspack 进行构建性
4242
```json title="package.json"
4343
{
4444
"scripts": {
45-
"dev:profile": "RSPACK_PROFILE=ALL rsbuild dev",
46-
"build:profile": "RSPACK_PROFILE=ALL rsbuild build"
45+
"dev:profile": "RSPACK_PROFILE=OVERVIEW rsbuild dev",
46+
"build:profile": "RSPACK_PROFILE=OVERVIEW rsbuild build"
4747
}
4848
}
4949
```
@@ -53,8 +53,8 @@ Rsbuild 支持使用 `RSPACK_PROFILE` 环境变量来对 Rspack 进行构建性
5353
```json title="package.json"
5454
{
5555
"scripts": {
56-
"dev:profile": "cross-env RSPACK_PROFILE=ALL rsbuild dev",
57-
"build:profile": "cross-env RSPACK_PROFILE=ALL rsbuild build"
56+
"dev:profile": "cross-env RSPACK_PROFILE=OVERVIEW rsbuild dev",
57+
"build:profile": "cross-env RSPACK_PROFILE=OVERVIEW rsbuild build"
5858
},
5959
"devDependencies": {
6060
"cross-env": "^7.0.0"

0 commit comments

Comments
 (0)