Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
chore: remove useless monitor code (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eason Gao authored Nov 1, 2021
1 parent 2872c7e commit 662369d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
4 changes: 0 additions & 4 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,3 @@ pub struct DetailedCell {
pub consumed_input_index: Option<u32>,
pub since: Option<u64>,
}

pub fn ministant_elapsed(start: u64, end: u64) -> f64 {
(end - start) as f64 * minstant::nanos_per_cycle() / 1_000_000f64
}
13 changes: 0 additions & 13 deletions core/storage/src/relational/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ impl Storage for RelationalStorage {
.into());
}

let start = common::minstant::now();
let lock_hashes = lock_hashes
.into_iter()
.map(|hash| to_rb_bytes(hash.as_bytes()))
Expand Down Expand Up @@ -341,12 +340,6 @@ impl Storage for RelationalStorage {
}
}

let elapsed_1 = common::minstant::now();
log::info!(
"[storage] get hashes cost {:?}",
common::ministant_elapsed(elapsed_1, start)
);

let mut cells = set.into_iter().collect::<Vec<_>>();
cells.sort();
if pagination.order == Order::Desc {
Expand Down Expand Up @@ -418,12 +411,6 @@ impl Storage for RelationalStorage {
)
});

let elapsed_2 = common::minstant::now();
log::info!(
"[storage] get txs cost {:?}",
common::ministant_elapsed(elapsed_2, elapsed_1)
);

Ok(fetch::to_pagination_response(
txs_wrapper,
next_cursor,
Expand Down

0 comments on commit 662369d

Please sign in to comment.