Skip to content

Commit

Permalink
Add column avg inclusion delay to pools summary
Browse files Browse the repository at this point in the history
  • Loading branch information
tdahar committed Mar 13, 2024
1 parent 913694e commit e3355c6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE t_pool_summary DROP COLUMN f_avg_inclusion_delay;
1 change: 1 addition & 0 deletions pkg/db/migrations/000004_add_inclusion_delay_pools.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE t_pool_summary ADD COLUMN avg_inclusion_delay Float;
3 changes: 2 additions & 1 deletion pkg/db/pools_summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ var (
COUNT(*) as count_expected_attestations,
SUM(CASE WHEN t_proposer_duties.f_proposed = TRUE THEN 1 ELSE 0 END) as proposed_blocks_performance,
SUM(CASE WHEN t_proposer_duties.f_proposed = FALSE THEN 1 ELSE 0 END) as missed_blocks_performance,
count(distinct(t_validator_rewards_summary.f_val_idx)) as number_active_vals
count(distinct(t_validator_rewards_summary.f_val_idx)) as number_active_vals,
AVG(f_inclusion_delay) as avg_inclusion_delay
FROM t_validator_rewards_summary
LEFT JOIN t_eth2_pubkeys
ON t_validator_rewards_summary.f_val_idx = t_eth2_pubkeys.f_val_idx
Expand Down

0 comments on commit e3355c6

Please sign in to comment.