mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
(refractor) timer and warm up query
This commit is contained in:
1 parent
1b2ee0f691
commit
d6f2b145c3
13 files changed
+294
-47
No files matched your search
@@ -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(())
|
||||
}
|
||||
Reference in new issue
Block a user