Compare commits
No commits in common. "4157779f12dc004a80363f1990c249f7955f8e96" and "32aeb332b14e6287d8461ab8eb92c33c0cf29660" have entirely different histories.
4157779f12
...
32aeb332b1
|
@ -68,20 +68,20 @@ pub async fn main() {
|
|||
// exit_notify.resubscribe(),
|
||||
// );
|
||||
|
||||
let _all_accounts = create_geyser_autoconnection_task_with_mpsc(
|
||||
config.clone(),
|
||||
all_accounts(),
|
||||
autoconnect_tx.clone(),
|
||||
exit_notify.resubscribe(),
|
||||
);
|
||||
|
||||
// let _token_accounts_task = create_geyser_autoconnection_task_with_mpsc(
|
||||
// let _all_accounts = create_geyser_autoconnection_task_with_mpsc(
|
||||
// config.clone(),
|
||||
// token_accounts(),
|
||||
// all_accounts(),
|
||||
// autoconnect_tx.clone(),
|
||||
// exit_notify.resubscribe(),
|
||||
// );
|
||||
|
||||
let _token_accounts_task = create_geyser_autoconnection_task_with_mpsc(
|
||||
config.clone(),
|
||||
token_accounts(),
|
||||
autoconnect_tx.clone(),
|
||||
exit_notify.resubscribe(),
|
||||
);
|
||||
|
||||
let current_processed_slot = AtomicSlot::default();
|
||||
start_tracking_slots(current_processed_slot.clone());
|
||||
start_tracking_account_consumer(geyser_messages_rx, current_processed_slot.clone());
|
||||
|
@ -190,6 +190,15 @@ fn start_tracking_account_consumer(mut geyser_messages_rx: Receiver<Message>, cu
|
|||
let slot = update.slot;
|
||||
let account_receive_time = get_epoch_sec();
|
||||
|
||||
let latest_slot = current_processed_slot.load(Ordering::Relaxed);
|
||||
|
||||
if latest_slot != 0 {
|
||||
// the perfect is value "-1"
|
||||
let delta = (latest_slot as i64) - (slot as i64);
|
||||
if debouncer.can_fire() {
|
||||
debug!("Account info for upcoming slot {} was {} behind current processed slot", slot, delta);
|
||||
}
|
||||
}
|
||||
|
||||
// if account_info.data.len() > 1000 {
|
||||
// trace!("got account update!!! {} - {:?} - {} bytes",
|
||||
|
@ -212,13 +221,13 @@ fn start_tracking_account_consumer(mut geyser_messages_rx: Receiver<Message>, cu
|
|||
|
||||
info!("Slot: {} - num of update messages: {}", slot, updates_per_slot.get(¤t_slot).unwrap());
|
||||
|
||||
let per_account_updates = wallclock_updates_per_slot_account.iter()
|
||||
let counters = wallclock_updates_per_slot_account.iter()
|
||||
.filter(|((slot, _pubkey), _)| slot == ¤t_slot)
|
||||
.map(|((_slot, _pubkey), updates)| updates.len() as f64)
|
||||
.sorted_by(|a, b| a.partial_cmp(b).unwrap())
|
||||
.collect_vec();
|
||||
let per_account_updates_histogram = histogram_percentiles::calculate_percentiles(&per_account_updates);
|
||||
info!("Per-account updates histogram: {}", per_account_updates_histogram);
|
||||
let count_histogram = histogram_percentiles::calculate_percentiles(&counters);
|
||||
info!("Count histogram: {}", count_histogram);
|
||||
|
||||
if let Some(actual_block_time) = block_time_per_slot.get(¤t_slot) {
|
||||
info!("Block time for slot {}: delta {} seconds", current_slot, account_receive_time - *actual_block_time);
|
||||
|
@ -238,17 +247,6 @@ fn start_tracking_account_consumer(mut geyser_messages_rx: Receiver<Message>, cu
|
|||
} // -- slot changed
|
||||
current_slot = slot;
|
||||
|
||||
|
||||
let latest_slot = current_processed_slot.load(Ordering::Relaxed);
|
||||
|
||||
if latest_slot != 0 {
|
||||
// the perfect is value "-1"
|
||||
let delta = (latest_slot as i64) - (slot as i64);
|
||||
if debouncer.can_fire() {
|
||||
debug!("Account info for upcoming slot {} was {} behind current processed slot", slot, delta);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
None => {}
|
||||
_ => {}
|
||||
|
|
Loading…
Reference in New Issue