File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ pub struct Config {
51
51
pub cargo_target : Option < String > ,
52
52
pub cargo_features : Vec < String > ,
53
53
pub cargo_cfg_overrides : Vec < String > ,
54
+ pub flame_log : Option < PathBuf > ,
54
55
pub verbose : u8 ,
55
56
pub compression : Compression ,
56
57
pub inputs : Vec < PathBuf > ,
Original file line number Diff line number Diff line change @@ -181,8 +181,12 @@ fn cwd() -> anyhow::Result<AbsPathBuf> {
181
181
}
182
182
183
183
fn main ( ) -> anyhow:: Result < ( ) > {
184
+ let mut cfg = config:: Config :: extract ( ) . context ( "failed to load configuration" ) ?;
185
+ if cfg. qltest {
186
+ qltest:: prepare ( & mut cfg) ?;
187
+ }
184
188
let start = Instant :: now ( ) ;
185
- let flame_layer = if let Ok ( path) = std :: env :: var ( "CODEQL_EXTRACTOR_RUST_OPTION_FLAME_LOG" ) {
189
+ let flame_layer = if let Some ( path) = & cfg . flame_log {
186
190
tracing_flame:: FlameLayer :: with_file ( path) . ok ( )
187
191
} else {
188
192
None
@@ -193,11 +197,6 @@ fn main() -> anyhow::Result<()> {
193
197
) )
194
198
. with ( flame_layer. map ( |x| x. 0 ) )
195
199
. init ( ) ;
196
-
197
- let mut cfg = config:: Config :: extract ( ) . context ( "failed to load configuration" ) ?;
198
- if cfg. qltest {
199
- qltest:: prepare ( & mut cfg) ?;
200
- }
201
200
info ! ( "{cfg:#?}\n " ) ;
202
201
203
202
let traps = trap:: TrapFileProvider :: new ( & cfg) . context ( "failed to set up trap files" ) ?;
You can’t perform that action at this time.
0 commit comments