(refractor) timer and warm up query

This commit is contained in:
polv committed 2026-03-03 12:44:54 +07:00
1 parent 1b2ee0f691
commit d6f2b145c3
13 files changed
+294 -47

No files matched your search

+5 -8
View File
@@ -1,9 +1,5 @@
use std::time::Instant;
use anyhow::Ok;
use cjdic2_core::AppService;
use cjdic2_core::{AppService, Timer};
mod common;
use common::get_db_dir;
@@ -11,9 +7,10 @@ use common::get_db_dir;
fn main() -> Result<(), anyhow::Error> {
let service = AppService::new(get_db_dir())?;
let start = Instant::now();
service.get_yomitan_writer()?;
println!("[{:.2?}]", start.elapsed());
{
let _timer = Timer::new("update schema".to_string());
service.get_yomitan_writer()?;
}
Ok(())
}