mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:35:42 +02:00
add --perf
cli param (#4391)
* add `--perf` cli param * clippy * fixed 2 `cp` tests on windows
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
use crate::is_perf_true;
|
||||
use crate::utils::{eval_source, report_error};
|
||||
use log::info;
|
||||
use nu_protocol::engine::{EngineState, Stack, StateDelta, StateWorkingSet};
|
||||
use std::path::PathBuf;
|
||||
|
||||
@ -22,6 +24,9 @@ pub(crate) fn read_plugin_file(engine_state: &mut EngineState, stack: &mut Stack
|
||||
eval_source(engine_state, stack, &contents, &plugin_filename);
|
||||
}
|
||||
}
|
||||
if is_perf_true() {
|
||||
info!("read_plugin_file {}:{}:{}", file!(), line!(), column!());
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn read_config_file(engine_state: &mut EngineState, stack: &mut Stack) {
|
||||
@ -63,6 +68,9 @@ pub(crate) fn read_config_file(engine_state: &mut EngineState, stack: &mut Stack
|
||||
}
|
||||
}
|
||||
}
|
||||
if is_perf_true() {
|
||||
info!("read_config_file {}:{}:{}", file!(), line!(), column!());
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn create_history_path() -> Option<PathBuf> {
|
||||
|
Reference in New Issue
Block a user