mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 21:26:50 +00:00
Additional instrumentation around global counter events.
This commit is contained in:
1 parent
bf48c7b1b4
commit
00f11a9e8f
2 files changed
+5
-1
No files matched your search
@@ -72,12 +72,14 @@ impl Data {
|
||||
#[inline]
|
||||
pub(super) fn pending_count(&self) -> Range<u64> { self.counter.range() }
|
||||
|
||||
#[tracing::instrument(name = "retire", level = "debug", skip(sender))]
|
||||
fn handle_retire(sender: &Sender<u64>, count: u64) -> Result {
|
||||
let _prev = sender.send_replace(count);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[tracing::instrument(name = "dispatch", level = "debug", skip(db, global))]
|
||||
fn store_count(db: &Arc<Database>, global: &Arc<Map>, count: u64) -> Result {
|
||||
let _cork = db.cork();
|
||||
global.insert(COUNTER, count.to_be_bytes());
|
||||
|
||||
Reference in new issue
Block a user