expands lifetime of SlotStats (#23872)

Current slot stats are removed when the slot is full or every 30 seconds
if the slot is before root:
https://github.com/solana-labs/solana/blob/493a8e234/ledger/src/blockstore.rs#L2017-L2027

In order to track if the slot is ultimately marked as dead or rooted and
emit more metrics, this commit expands lifetime of SlotStats while
bounding total size of cache using an LRU eviction policy.
This commit is contained in:
behzad nouri
2022-03-25 19:32:22 +00:00
committed by GitHub
parent c6dda3b324
commit 1f9c89c1e8
5 changed files with 115 additions and 87 deletions

2
Cargo.lock generated
View File

@@ -5075,6 +5075,7 @@ version = "1.11.0"
dependencies = [
"assert_matches",
"bincode",
"bitflags",
"byteorder",
"chrono",
"chrono-humanize",
@@ -5085,6 +5086,7 @@ dependencies = [
"lazy_static",
"libc",
"log",
"lru",
"matches",
"num-derive",
"num-traits",