Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-bc committed Oct 29, 2019
1 parent e2e469c commit 4078c24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/new_index/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ impl Query {
}

pub fn stats(&self, scripthash: &[u8]) -> (ScriptStats, ScriptStats) {
debug!("Fetching chain stats for {:?}", scripthash);
debug!("Fetching chain stats...");
let chain_stats = self.chain.stats(scripthash);
debug!("Fetching mempool stats for {:?}", scripthash);
debug!("Fetching mempool stats...");
let mempool_stats = self.mempool().stats(scripthash);

return (chain_stats, mempool_stats)
Expand Down
3 changes: 3 additions & 0 deletions src/new_index/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ impl ChainQuery {
}

fn start_timer(&self, name: &str) -> HistogramTimer {
debug!("Starting timer {}", name);
self.duration.with_label_values(&[name]).start_timer()
}

Expand Down Expand Up @@ -536,6 +537,8 @@ impl ChainQuery {
start_height: usize,
) -> (ScriptStats, Option<Sha256dHash>) {
let _timer = self.start_timer("stats_delta"); // TODO: measure also the number of txns processed.

debug!("Performing history iter scan...");
let history_iter = self
.history_iter_scan(b'H', scripthash, start_height)
.map(TxHistoryRow::from_row)
Expand Down

0 comments on commit 4078c24

Please sign in to comment.