class BlobfsMetrics
Defined at line 39 of file ../../src/storage/blobfs/blobfs_metrics.h
Encapsulates Blobfs-specific metrics available via Inspect.
TODO(https://fxbug.dev/42160612): Make this properly thread-safe. IncrementPageIn(),
paged_read_metrics(), unpaged_read_metrics(), and verification_metrics() are not thread safe.
TODO(https://fxbug.dev/42160612): Make this class encapsulate all Blobfs-specific metrics, and
have BlobfsInspectTree take ownership of it.
Public Methods
void BlobfsMetrics (bool should_record_page_in, inspect::Inspector inspector)
Defined at line 28 of file ../../src/storage/blobfs/blobfs_metrics.cc
void ~BlobfsMetrics ()
Defined at line 42 of file ../../src/storage/blobfs/blobfs_metrics.h
void UpdateAllocation (uint64_t size_data, const fs::Duration & duration)
Updates aggregate information about the total number of created blobs since mounting.
Defined at line 45 of file ../../src/storage/blobfs/blobfs_metrics.cc
void UpdateLookup (uint64_t size)
Updates aggregate information about the number of blobs opened since mounting.
Defined at line 51 of file ../../src/storage/blobfs/blobfs_metrics.cc
void UpdateClientWrite (uint64_t data_size, uint64_t merkle_size, const fs::Duration & enqueue_duration, const fs::Duration & generate_duration)
Updates aggregates information about blobs being written back to blobfs since mounting.
Defined at line 56 of file ../../src/storage/blobfs/blobfs_metrics.cc
void IncrementPageIn (const fbl::String & merkle_hash, uint64_t offset, uint64_t length)
Increments the frequency count for blocks in the range [|offset|, |offset| + |length|). This
method must only be called from the pager thread.
NOTE: This method is a NOP unless |BLOBFS_ENABLE_PAGE_IN_METRICS| compiler flag
has been set in the BUILD.gn
Defined at line 65 of file ../../src/storage/blobfs/blobfs_metrics.cc
ReadMetrics & paged_read_metrics ()
Accessors for ReadMetrics. The metrics objects returned are NOT thread-safe. The metrics
objects are to be used by exactly one thread (main or pager). Used to increment relevant
metrics from the blobfs main thread and the user pager thread.
Defined at line 70 of file ../../src/storage/blobfs/blobfs_metrics.h
ReadMetrics & unpaged_read_metrics ()
Defined at line 71 of file ../../src/storage/blobfs/blobfs_metrics.h
VerificationMetrics & verification_metrics ()
Accessor for VerificationMetrics. This metrics object is thread-safe. Used to increment
relevant metrics from the blobfs main thread and the user pager thread.
The |BlobfsMetrics| class is not thread-safe except for this accessor.
Defined at line 76 of file ../../src/storage/blobfs/blobfs_metrics.h
inspect::Inspector * inspector ()
Accessor for BlobFS Inspector. This Inspector serves the BlobFS inspect tree.
Defined at line 79 of file ../../src/storage/blobfs/blobfs_metrics.h
void IncrementBlobLayoutCount (BlobLayoutFormat layout)
Add 1 blob for the given layout. Call on blob write completion.
Defined at line 104 of file ../../src/storage/blobfs/blobfs_metrics.cc
void DecrementBlobLayoutCount (BlobLayoutFormat layout)
Subtract 1 blob for the given layout. Call on blob removal.
Defined at line 115 of file ../../src/storage/blobfs/blobfs_metrics.cc