diff --git a/docs/pages/repo/docs/reference/command-line-reference/run.mdx b/docs/pages/repo/docs/reference/command-line-reference/run.mdx index 0bc87bfe181d7..1d823d558cb16 100644 --- a/docs/pages/repo/docs/reference/command-line-reference/run.mdx +++ b/docs/pages/repo/docs/reference/command-line-reference/run.mdx @@ -348,6 +348,8 @@ turbo run dev --parallel --no-cache Generates a trace of the run in Chrome Tracing format that you can use to analyze performance. The profile can be viewed in [Perfetto](https://ui.perfetto.dev/). +You must provide a verbosity flag (`-v`, `-vv`, or `-vvv`) with the `--profile` to produce a trace. + ```sh turbo run build --profile=profile.json ``` @@ -406,35 +408,32 @@ turbo run build --preflight The same behavior can also be set via the `TURBO_PREFLIGHT=true` environment variable. -### `--trace` - -`type: string` +### `--verbosity` -To view CPU trace, outputs the trace to the given file, use `go tool trace [file]`. +To specify log level, use `--verbosity=` or `-v, -vv, -vvv`. - - **Important**: The trace viewer doesn't work under Windows Subsystem for - Linux. - +- `Info `: `--verbosity=1`, or `-v` +- `Debug`: `--verbosity=2`, or `-vv` +- `Trace`: `--verbosity=3`, or `-vvv` ```sh -turbo run build --trace="" +turbo run build -v +turbo run build --verbosity=2 +turbo run build -vvv ``` -### `--heap` - -`type: string` - -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. - -```sh -turbo run build --heap="" -``` +## Deprecated Options ### `--cpuprofile` `type: string` + + `--cpuprofile` is deprecated in `1.11.x`. Please use + [`--profile`](#--profile) + instead. + + To view CPU profile, outputs the profile to the given file, drop the file into [speedscope](https://www.speedscope.app/). @@ -447,22 +446,6 @@ To view CPU profile, outputs the profile to the given file, drop the file into [ turbo run build --cpuprofile="" ``` -### `--verbosity` - -To specify log level, use `--verbosity=` or `-v, -vv, -vvv`. - -- `Info `: `--verbosity=1`, or `-v` -- `Debug`: `--verbosity=2`, or `-vv` -- `Trace`: `--verbosity=3`, or `-vvv` - -```sh -turbo run build -v -turbo run build --verbosity=2 -turbo run build -vvv -``` - -## Deprecated Options - ### `--include-dependencies` @@ -502,6 +485,21 @@ cached. Then, you change a line of code in B. With the `--deps` flag on, running because they are not impacted by the change. If you were to run `turbo run build --no-deps` instead, turbo will only run `build` in B. +### `--heap` + + + `--heap` is deprecated in `1.2.x`. Please use + [`--profile`](#--profile) instead. + + +`type: string` + +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. + +```sh +turbo run build --heap="" +``` + ### `--scope` @@ -539,6 +537,27 @@ turbo run build --since=origin/main input files for a workspace exist inside their respective workspace folders. +### `--trace` + + + `--trace` is deprecated in `1.11.x`, use + [`--profile`](#--profile) + instead. + + +`type: string` + +To view CPU trace, outputs the trace to the given file, use `go tool trace [file]`. + + + **Important**: The trace viewer doesn't work under Windows Subsystem for + Linux. + + +```sh +turbo run build --trace="" +``` + [1]: /repo/docs/reference/configuration#passThroughEnv [2]: /repo/docs/reference/configuration#globalPassThroughEnv [3]: /repo/docs/core-concepts/monorepos/filtering diff --git a/profile.json b/profile.json new file mode 100644 index 0000000000000..c44dc44f37c7b --- /dev/null +++ b/profile.json @@ -0,0 +1,3 @@ +[ + +] \ No newline at end of file