diff --git a/src/bees-context.cc b/src/bees-context.cc index c0f4e4e..babee3f 100644 --- a/src/bees-context.cc +++ b/src/bees-context.cc @@ -24,10 +24,16 @@ getenv_or_die(const char *name) BeesFdCache::BeesFdCache() { m_root_cache.func([&](shared_ptr ctx, uint64_t root) -> Fd { - return ctx->roots()->open_root_nocache(root); + Timer open_timer; + auto rv = ctx->roots()->open_root_nocache(root); + BEESCOUNTADD(open_root_ms, open_timer.age() * 1000); + return rv; }); m_file_cache.func([&](shared_ptr ctx, uint64_t root, uint64_t ino) -> Fd { - return ctx->roots()->open_root_ino_nocache(root, ino); + Timer open_timer; + auto rv = ctx->roots()->open_root_ino_nocache(root, ino); + BEESCOUNTADD(open_ino_ms, open_timer.age() * 1000); + return rv; }); } diff --git a/src/bees-roots.cc b/src/bees-roots.cc index 7ca9b96..251374c 100644 --- a/src/bees-roots.cc +++ b/src/bees-roots.cc @@ -661,7 +661,9 @@ BeesCrawl::fetch_extents() { BEESNOTE("searching crawl sk " << static_cast(sk)); BEESTOOLONG("Searching crawl sk " << static_cast(sk)); + Timer crawl_timer; ioctl_ok = sk.do_ioctl_nothrow(m_ctx->root_fd()); + BEESCOUNTADD(crawl_ms, crawl_timer.age() * 1000); } if (ioctl_ok) {