eden/fs/docs/stats/EdenExposedSaplingCounters.md
These stats signals are recorded in the Sapling layers. However, they have information that is needed on EdenFS debuggings. Currently we have the following categories of these stats:
A- scmstore.file.fetch.{xxx}.{yyy}.{zzz}:
{xxx} can be aux, indexedlog, lfs which are the place that Sapling fulfill
the request
{yyy} can be cache or local which are the place that Sapling fulfill the
request.
cache is the hgcache which is the remote server's cache. The objects in cache
can be deleted anytime, because it is cache!
local are the files that are modified locally. The objects in local are
permanent, and cannot be deleted like cache.
keys : scmstore.file.fetch.{xxx}.{yyy}.keys
requests : scmstore.file.fetch.{xxx}.{yyy}.requests
hits : scmstore.file.fetch.{xxx}.{yyy}.hits
misses : scmstore.file.fetch.{xxx}.{yyy}.misses
time : scmstore.file.fetch.{xxx}.{yyy}.time
Note1 : Also, we have scmstore.file.fetch.aux.cache.computed which is the
number of computed aux data.
Note2 : Only for indexedlog in addition to file we have tree counters
too. It shows the information (keys, requests, hits, misses, and time) for
directory requests.
B- scmstore.{xxx}.fetch.edenapi.{yyy}:
These are all the signals that are recorded when Sapling fulfills a {xxx} (file | tree) request from Mononoke.
hits : scmstore.file.fetch.edenapi.hits
keys : scmstore.file.fetch.edenapi.keys
requests : scmstore.file.fetch.edenapi.requests
time : scmstore.file.fetch.edenapi.time
C- scmstore.{xxx}.fetch.cas.{yyy}:
These are all the signals that are recorded when Sapling fulfills a {xxx} (file | tree) request from CAS.
hits : scmstore.file.fetch.cas.hits
keys : scmstore.file.fetch.cas.keys
requests : scmstore.file.fetch.cas.requests
time : scmstore.file.fetch.cas.time
D- eden.edenffi.ffs.{xxx} :
FileteredFS backing store sends a request to Sapling to check the filter for a request object. Sapling collects the following stats which are reported in EdenFS counters:
lookups : The total number of filter object requests send to Saplinglookup_failures : The total number of filter object requests which
are failedinvalid_repo : The total number of filter object requests which has
invalid reporepo_cache_hits : The total number of filter object requests that
don't have to recreate the repo object. It is already in the cacherepo_cache_misses : The total number of filter object requests that
have to recreate the repo object. It is not available in the cacheE- scmstore.{xxx}.fetch.cas.{yyy}.bytes : These are all the signals that
are recorded when Sapling fulfills a {xxx} (file | tree) request from CAS.
zdb : Total number of bytes fetched from the CAS ZippyDb backendzgw : Total number of bytes fetched from the CAS ZGW backendmanifold : Total number of bytes fetched from the CAS Manifold
backendhedwig : Total number of bytes fetched from the CAS Hedwig backendF- scmstore.{xxx}.fetch.cas.{yyy}.queries : These are all the signals that
are recorded when Sapling fulfills a {xxx} (file | tree) request from CAS.
zdb : Total number of queries to the CAS ZippyDb backendzgw : Total number of queries to the CAS ZGW backendmanifold : Total number of queries to the CAS Manifold backendhedwig : Total number of queries to the CAS Hedwig backendNote: This commit is a good examples of how to add counters to Sapling.