MCPcopy Create free account
hub / github.com/Firstyear/opensuse-proxy-cache / cache_stats

Function cache_stats

opensuse-proxy-cache/src/cache.rs:685–697  ·  view source on GitHub ↗
(pri_cache: ArcDiskCache<PathBuf, Status>)

Source from the content-addressed store, hash-verified

683}
684
685async fn cache_stats(pri_cache: ArcDiskCache<PathBuf, Status>) {
686 // let zero = CacheStats::default();
687 loop {
688 let stats = pri_cache.view_stats();
689 warn!("cache stats - {:?}", stats);
690 // stats.change_since(&zero));
691 if cfg!(debug_assertions) {
692 sleep(Duration::from_secs(5)).await;
693 } else {
694 sleep(Duration::from_secs(300)).await;
695 }
696 }
697}
698
699fn cache_mgr(mut submit_rx: Receiver<CacheMeta>, pri_cache: ArcDiskCache<PathBuf, Status>) {
700 // Wait on the channel, and when we get something proceed from there.

Callers 1

newMethod · 0.85

Calls 1

view_statsMethod · 0.80

Tested by

no test coverage detected