mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-09 07:17:56 -05:00
print instants
This commit is contained in:
@@ -393,7 +393,7 @@ impl TransactionFetcher {
|
||||
|
||||
let elapsed = now.elapsed();
|
||||
if elapsed.as_millis() > 1 {
|
||||
println!("find_any_idle_fallback_peer_for_any_pending_hash: {:?}", elapsed);
|
||||
println!("search_breadth_budget_find_intersection_pending_hashes_and_hashes_seen_by_peer: {:?}", elapsed);
|
||||
}
|
||||
|
||||
self.fill_request_from_hashes_pending_fetch(
|
||||
|
||||
@@ -802,12 +802,13 @@ where
|
||||
}
|
||||
|
||||
let now = Instant::now();
|
||||
let len = non_blob_txs.len();
|
||||
|
||||
self.import_transactions(peer_id, non_blob_txs, TransactionSource::Broadcast);
|
||||
|
||||
let elapsed = now.elapsed();
|
||||
if elapsed.as_millis() > 1 {
|
||||
println!("import_transactions: {:?}", elapsed);
|
||||
println!("import_transactions broadcast {}: {:?}", len, elapsed);
|
||||
}
|
||||
|
||||
if has_blob_txs {
|
||||
@@ -1143,7 +1144,7 @@ where
|
||||
some_ready = true;
|
||||
}
|
||||
|
||||
let now = Instant::now();
|
||||
|
||||
|
||||
// drain incoming transaction events
|
||||
if let Poll::Ready(Some(event)) = this.transaction_events.poll_next_unpin(cx) {
|
||||
@@ -1151,22 +1152,23 @@ where
|
||||
some_ready = true;
|
||||
}
|
||||
|
||||
let elapsed = now.elapsed();
|
||||
if elapsed.as_millis() > 10 {
|
||||
println!("on_network_tx_event: {:?}", elapsed);
|
||||
}
|
||||
|
||||
this.update_fetch_metrics();
|
||||
|
||||
// drain fetching transaction events
|
||||
if let Poll::Ready(Some(fetch_event)) = this.transaction_fetcher.poll_next_unpin(cx) {
|
||||
match fetch_event {
|
||||
FetchEvent::TransactionsFetched { peer_id, transactions } => {
|
||||
let now = Instant::now();
|
||||
let len = transactions.len();
|
||||
this.import_transactions(
|
||||
peer_id,
|
||||
transactions,
|
||||
TransactionSource::Response,
|
||||
);
|
||||
let elapsed = now.elapsed();
|
||||
if elapsed.as_millis() > 10 {
|
||||
println!("import_transactions request {}: {:?}", len, elapsed);
|
||||
}
|
||||
}
|
||||
FetchEvent::FetchError { peer_id, error } => {
|
||||
trace!(target: "net::tx", ?peer_id, ?error, "requesting transactions from peer failed");
|
||||
|
||||
Reference in New Issue
Block a user