Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/src/banking_stage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ pub struct BatchedTransactionCostDetails {
pub batched_signature_cost: u64,
pub batched_write_lock_cost: u64,
pub batched_data_bytes_cost: u64,
pub batched_loaded_accounts_data_size_cost: u64,
pub batched_programs_execute_cost: u64,
}

Expand Down
25 changes: 25 additions & 0 deletions core/src/banking_stage/qos_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,15 @@ impl QosService {
batched_transaction_details.costs.batched_data_bytes_cost,
Ordering::Relaxed,
);
self.metrics
.stats
.estimated_loaded_accounts_data_size_cu
.fetch_add(
batched_transaction_details
.costs
.batched_loaded_accounts_data_size_cost,
Ordering::Relaxed,
);
self.metrics.stats.estimated_programs_execute_cu.fetch_add(
batched_transaction_details
.costs
Expand Down Expand Up @@ -333,6 +342,12 @@ impl QosService {
batched_transaction_details.costs.batched_data_bytes_cost,
cost.data_bytes_cost()
);
saturating_add_assign!(
batched_transaction_details
.costs
.batched_loaded_accounts_data_size_cost,
cost.loaded_accounts_data_size_cost()
);
saturating_add_assign!(
batched_transaction_details
.costs
Expand Down Expand Up @@ -428,6 +443,9 @@ struct QosServiceMetricsStats {
/// accumulated estimated instruction data Compute Units to be packed into block
estimated_data_bytes_cu: AtomicU64,

/// accumulated estimated loaded accounts data size cost to be packed into block
estimated_loaded_accounts_data_size_cu: AtomicU64,

/// accumulated estimated program Compute Units to be packed into block
estimated_programs_execute_cu: AtomicU64,

Expand Down Expand Up @@ -512,6 +530,13 @@ impl QosServiceMetrics {
.swap(0, Ordering::Relaxed),
i64
),
(
"estimated_loaded_accounts_data_size_cu",
self.stats
.estimated_loaded_accounts_data_size_cu
.swap(0, Ordering::Relaxed),
i64
),
(
"estimated_programs_execute_cu",
self.stats
Expand Down