mirror of
https://github.com/0xfnzero/solana-streamer.git
synced 2026-08-18 03:18:05 +00:00
feat: add event processing time tracking (v0.1.6)
- Add processing duration monitoring - Update all protocol parser interfaces - Improve PumpFun dev address detection - Bump version to 0.1.6
This commit is contained in:
@@ -27,6 +27,14 @@ macro_rules! impl_unified_event {
|
||||
self.metadata.program_received_time_ms
|
||||
}
|
||||
|
||||
fn program_handle_time_consuming_ms(&self) -> i64 {
|
||||
self.metadata.program_handle_time_consuming_ms
|
||||
}
|
||||
|
||||
fn set_program_handle_time_consuming_ms(&mut self, program_handle_time_consuming_ms: i64) {
|
||||
self.metadata.program_handle_time_consuming_ms = program_handle_time_consuming_ms;
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn std::any::Any {
|
||||
self
|
||||
}
|
||||
|
||||
@@ -158,6 +158,7 @@ pub struct EventMetadata {
|
||||
pub block_time: i64,
|
||||
pub block_time_ms: i64,
|
||||
pub program_received_time_ms: i64,
|
||||
pub program_handle_time_consuming_ms: i64,
|
||||
pub protocol: ProtocolType,
|
||||
pub event_type: EventType,
|
||||
pub program_id: Pubkey,
|
||||
@@ -176,6 +177,7 @@ impl EventMetadata {
|
||||
event_type: EventType,
|
||||
program_id: Pubkey,
|
||||
index: String,
|
||||
program_received_time_ms: i64,
|
||||
) -> Self {
|
||||
Self {
|
||||
id,
|
||||
@@ -183,7 +185,8 @@ impl EventMetadata {
|
||||
slot,
|
||||
block_time,
|
||||
block_time_ms,
|
||||
program_received_time_ms: chrono::Utc::now().timestamp_millis(),
|
||||
program_received_time_ms: program_received_time_ms,
|
||||
program_handle_time_consuming_ms: 0,
|
||||
protocol,
|
||||
event_type,
|
||||
program_id,
|
||||
|
||||
Reference in New Issue
Block a user