trace app start duration

This commit is contained in:
extrawurst 2022-11-21 14:30:17 +01:00
parent faf912393b
commit 3667db37e1

View File

@ -113,6 +113,8 @@ pub enum AsyncNotification {
}
fn main() -> Result<()> {
let app_start = Instant::now();
let cliargs = process_cmdline()?;
let _profiler = Profiler::new();
@ -143,6 +145,7 @@ fn main() -> Result<()> {
loop {
let quit_state = run_app(
app_start,
repo_path.clone(),
theme,
key_config.clone(),
@ -162,6 +165,7 @@ fn main() -> Result<()> {
}
fn run_app(
app_start: Instant,
repo: RepoPath,
theme: Theme,
key_config: KeyConfig,
@ -188,6 +192,8 @@ fn run_app(
let mut spinner = Spinner::default();
let mut first_update = true;
log::trace!("app start: {} ms", app_start.elapsed().as_millis());
loop {
let event = if first_update {
first_update = false;