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:
ysq
2025-07-29 14:48:43 +08:00
parent 2e864dd14e
commit 0a4be48b99
13 changed files with 93 additions and 24 deletions
+8
View File
@@ -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
}
+4 -1
View File
@@ -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,