BioShowCacheHitRatio
Function Definition
Queries the system cache hit ratio. It requires the caller to invoke the BioFreeCacheHitPtr interface to release the allocated memory resources for the query results.
Implementation
CResult BioShowCacheHitRatio(CacheHitFinalDesc *desc, CacheHitFinalDesc **nodeDesc, uint64_t *nodeNum)
Parameters
Parameter |
Data Type |
Input/Output |
Description |
|---|---|---|---|
desc |
CacheHitFinalDesc* |
Output |
Cache hit ratio of all nodes. For details about the parameters, see Table 2. |
nodeDesc |
CacheHitFinalDesc** |
Output |
Cache hit ratio of each node. |
nodeNum |
uint64_t* |
Output |
Number of nodes. |
Parameter |
Structure Field |
Description |
|---|---|---|
CacheHitFinalDesc |
nodeId |
Node ID. When the hit ratio of all nodes is queried, this field is invalid. |
rCacheHitMemCount |
Number of read cache memory hits. |
|
rCacheHitDiskCount |
Number of read cache drive hits. |
|
rCacheHitCount |
Total number of read cache hits. |
|
rCacheTotalCount |
Total number of read cache queries. |
|
wCacheHitMemCount |
Number of write cache memory hits. |
|
wCacheHitDiskCount |
Number of write cache drive hits. |
|
wCacheHitCount |
Total number of write cache hits. |
|
wCacheTotalCount |
Total number of write cache queries. |
|
backendHitCount |
Number of backend hits. |
Return Values
Return Value |
Description |
|---|---|
RET_CACHE_OK |
The operation is successful. |
RET_CACHE_NOT_READY |
The BoostIO service is not ready. |
RET_CACHE_EPERM |
The input parameter is incorrect. |
RET_CACHE_NOT_FOUND |
The cache instance is not found. |
RET_CACHE_NO_SPACE |
Insufficient space. |
RET_CACHE_ERROR |
The operation failed. |