refactor(kademlia,metrics): make metrics persistent writes asynchronous (#1873)
This optimization includes: - all counters are stored in memory by default in order to minimize disc I/O operations - counters that need to be persisted are flushed periodically to the persistent store - switch to sync.Map which is more suitable for the case of disjoint sets of keys - using lock-free data structures for the critical parts
Showing
This diff is collapsed.
Please register or sign in to comment