Skip to content

Commit af15005

Browse files
authored
Update for --profile flag. (#6773)
1 parent fe6ddbd commit af15005

File tree

2 files changed

+56
-34
lines changed

2 files changed

+56
-34
lines changed

docs/pages/repo/docs/reference/command-line-reference/run.mdx

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,8 @@ turbo run dev --parallel --no-cache
348348
Generates a trace of the run in Chrome Tracing format that you can use to analyze performance.
349349
The profile can be viewed in [Perfetto](https://ui.perfetto.dev/).
350350

351+
You must provide a verbosity flag (`-v`, `-vv`, or `-vvv`) with the `--profile` to produce a trace.
352+
351353
```sh
352354
turbo run build --profile=profile.json
353355
```
@@ -406,35 +408,32 @@ turbo run build --preflight
406408

407409
The same behavior can also be set via the `TURBO_PREFLIGHT=true` environment variable.
408410

409-
### `--trace`
410-
411-
`type: string`
411+
### `--verbosity`
412412

413-
To view CPU trace, outputs the trace to the given file, use `go tool trace [file]`.
413+
To specify log level, use `--verbosity=<num>` or `-v, -vv, -vvv`.
414414

415-
<Callout>
416-
**Important**: The trace viewer doesn't work under Windows Subsystem for
417-
Linux.
418-
</Callout>
415+
- `Info `: `--verbosity=1`, or `-v`
416+
- `Debug`: `--verbosity=2`, or `-vv`
417+
- `Trace`: `--verbosity=3`, or `-vvv`
419418

420419
```sh
421-
turbo run build --trace="<trace-file-name>"
420+
turbo run build -v
421+
turbo run build --verbosity=2
422+
turbo run build -vvv
422423
```
423424

424-
### `--heap`
425-
426-
`type: string`
427-
428-
To view heap trace, outputs the trace to the given file, use `go tool pprof [file]` and type `top`. You can also drop it into [speedscope](https://www.speedscope.app/) and use the `left heavy` or `sandwich` view modes.
429-
430-
```sh
431-
turbo run build --heap="<heap-file-name>"
432-
```
425+
## Deprecated Options
433426

434427
### `--cpuprofile`
435428

436429
`type: string`
437430

431+
<Callout type="error">
432+
`--cpuprofile` is deprecated in `1.11.x`. Please use
433+
[`--profile`](#--profile)
434+
instead.
435+
</Callout>
436+
438437
To view CPU profile, outputs the profile to the given file, drop the file into [speedscope](https://www.speedscope.app/).
439438

440439
<Callout>
@@ -447,22 +446,6 @@ To view CPU profile, outputs the profile to the given file, drop the file into [
447446
turbo run build --cpuprofile="<cpu-profile-file-name>"
448447
```
449448

450-
### `--verbosity`
451-
452-
To specify log level, use `--verbosity=<num>` or `-v, -vv, -vvv`.
453-
454-
- `Info `: `--verbosity=1`, or `-v`
455-
- `Debug`: `--verbosity=2`, or `-vv`
456-
- `Trace`: `--verbosity=3`, or `-vvv`
457-
458-
```sh
459-
turbo run build -v
460-
turbo run build --verbosity=2
461-
turbo run build -vvv
462-
```
463-
464-
## Deprecated Options
465-
466449
### `--include-dependencies`
467450

468451
<Callout type="error">
@@ -502,6 +485,21 @@ cached. Then, you change a line of code in B. With the `--deps` flag on, running
502485
because they are not impacted by the change. If you were to run
503486
`turbo run build --no-deps` instead, turbo will only run `build` in B.
504487

488+
### `--heap`
489+
490+
<Callout type="error">
491+
`--heap` is deprecated in `1.2.x`. Please use
492+
[`--profile`](#--profile) instead.
493+
</Callout>
494+
495+
`type: string`
496+
497+
To view heap trace, outputs the trace to the given file, use `go tool pprof [file]` and type `top`. You can also drop it into [speedscope](https://www.speedscope.app/) and use the `left heavy` or `sandwich` view modes.
498+
499+
```sh
500+
turbo run build --heap="<heap-file-name>"
501+
```
502+
505503
### `--scope`
506504

507505
<Callout type="error">
@@ -539,6 +537,27 @@ turbo run build --since=origin/main
539537
input files for a workspace exist inside their respective workspace folders.
540538
</Callout>
541539

540+
### `--trace`
541+
542+
<Callout type="error">
543+
`--trace` is deprecated in `1.11.x`, use
544+
[`--profile`](#--profile)
545+
instead.
546+
</Callout>
547+
548+
`type: string`
549+
550+
To view CPU trace, outputs the trace to the given file, use `go tool trace [file]`.
551+
552+
<Callout>
553+
**Important**: The trace viewer doesn't work under Windows Subsystem for
554+
Linux.
555+
</Callout>
556+
557+
```sh
558+
turbo run build --trace="<trace-file-name>"
559+
```
560+
542561
[1]: /repo/docs/reference/configuration#passThroughEnv
543562
[2]: /repo/docs/reference/configuration#globalPassThroughEnv
544563
[3]: /repo/docs/core-concepts/monorepos/filtering

profile.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[
2+
3+
]

0 commit comments

Comments
 (0)