Skip to content

Commit 3667db3

Browse files
committed
trace app start duration
1 parent faf9123 commit 3667db3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ pub enum AsyncNotification {
113113
}
114114

115115
fn main() -> Result<()> {
116+
let app_start = Instant::now();
117+
116118
let cliargs = process_cmdline()?;
117119

118120
let _profiler = Profiler::new();
@@ -143,6 +145,7 @@ fn main() -> Result<()> {
143145

144146
loop {
145147
let quit_state = run_app(
148+
app_start,
146149
repo_path.clone(),
147150
theme,
148151
key_config.clone(),
@@ -162,6 +165,7 @@ fn main() -> Result<()> {
162165
}
163166

164167
fn run_app(
168+
app_start: Instant,
165169
repo: RepoPath,
166170
theme: Theme,
167171
key_config: KeyConfig,
@@ -188,6 +192,8 @@ fn run_app(
188192
let mut spinner = Spinner::default();
189193
let mut first_update = true;
190194

195+
log::trace!("app start: {} ms", app_start.elapsed().as_millis());
196+
191197
loop {
192198
let event = if first_update {
193199
first_update = false;

0 commit comments

Comments
 (0)