File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ fn setup_logger() -> Option<tracing_chrome::FlushGuard> {
5454 . with_filter ( env) ;
5555
5656 let ( profile_layer, profile_guard) =
57- if env_to_bool ( std:: env:: var_os ( "__CARGO_LOG_PROFILE " ) . as_deref ( ) ) {
57+ if env_to_bool ( std:: env:: var_os ( "CARGO_LOG_PROFILE " ) . as_deref ( ) ) {
5858 let capture_args =
59- env_to_bool ( std:: env:: var_os ( "__CARGO_LOG_PROFILE_CAPTURE_ARGS " ) . as_deref ( ) ) ;
59+ env_to_bool ( std:: env:: var_os ( "CARGO_LOG_PROFILE_CAPTURE_ARGS " ) . as_deref ( ) ) ;
6060 let ( layer, guard) = tracing_chrome:: ChromeLayerBuilder :: new ( )
6161 . include_args ( capture_args)
6262 . build ( ) ;
Original file line number Diff line number Diff line change @@ -6,18 +6,20 @@ Cargo leverages [tracing](https://crates.io/crates/tracing)
66as a basic, hierarchical built-in profiler.
77
88Environment variables:
9- - ` __CARGO_LOG_PROFILE =<true|1>` : log tracing events to a file in the current working directory
10- - ` __CARGO_LOG_PROFILE_CAPTURE_ARGS =<true|1>` : include arguments in the events
9+ - ` CARGO_LOG_PROFILE =<true|1>` : log tracing events to a file in the current working directory
10+ - ` CARGO_LOG_PROFILE_CAPTURE_ARGS =<true|1>` : include arguments in the events
1111
1212At process exit, your trace will be in a file like ` trace-1668480819035032.json ` .
1313Open that file with [ ui.perfetto.dev] ( https://ui.perfetto.dev ) (or chrome://tracing) to browse your trace.
1414
1515Example:
1616``` console
1717$ # Output first three levels of profiling info
18- $ __CARGO_LOG_PROFILE =true cargo generate-lockfile
18+ $ CARGO_LOG_PROFILE =true cargo generate-lockfile
1919```
2020
21+ ** Note:** This is intended for the development of cargo and there are no compatibility guarantees on this functionality.
22+
2123## Benchmarking
2224
2325### Benchsuite
You can’t perform that action at this time.
0 commit comments