···116116- [ ] persist the jetstream server url, error if started with a different one (maybe with --switch-streams or something)
117117- [ ] put delete-account tasks into a separate (persisted?) task queue for the writer so it can work on them incrementally.
118118- [ ] jetstream: connect retry: only reset counter after some *time* has passed.
119119+- [x] either count or estimate the total number of links added (distinct from link targets)
119120120121data fixes
121122- [x] add rkey to linkers 🤦♀️
+17-1
link_aggregator/src/storage/mem_store.rs
···11-use super::{LinkReader, LinkStorage, PagedAppendingCollection};
11+use super::{LinkReader, LinkStorage, PagedAppendingCollection, StorageStats};
22use anyhow::Result;
33use link_aggregator::{ActionableEvent, Did, RecordId};
44use links::CollectedLink;
···202202 }
203203 }
204204 Ok(out)
205205+ }
206206+207207+ fn get_stats(&self) -> Result<StorageStats> {
208208+ let data = self.0.lock().unwrap();
209209+ let dids = data.dids.len() as u64;
210210+ let targetables = data
211211+ .targets
212212+ .values()
213213+ .map(|sources| sources.len())
214214+ .sum::<usize>() as u64;
215215+ let linking_records = data.links.values().map(|recs| recs.len()).sum::<usize>() as u64;
216216+ Ok(StorageStats {
217217+ dids,
218218+ targetables,
219219+ linking_records,
220220+ })
205221 }
206222207223 fn summarize(&self, qsize: u32) {