Open CAS Framework
Open source framework of Cache Acceleration Software
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Functions
ocf_stats.h File Reference

OCF API for updating and reseting statistics. More...

Go to the source code of this file.

Data Structures

struct  ocf_stat
 
struct  ocf_stats_usage
 Usage statistics in 4 KiB unit. More...
 
struct  ocf_stats_requests
 Requests statistcs. More...
 
struct  ocf_stats_blocks
 Block statistics. More...
 
struct  ocf_stats_errors
 Errors statistics. More...
 

Functions

int ocf_stats_collect_cache (ocf_cache_t cache, struct ocf_stats_usage *usage, struct ocf_stats_requests *req, struct ocf_stats_blocks *blocks, struct ocf_stats_errors *errors)
 
int ocf_stats_collect_core (ocf_core_t core, struct ocf_stats_usage *usage, struct ocf_stats_requests *req, struct ocf_stats_blocks *blocks, struct ocf_stats_errors *errors)
 
int ocf_stats_collect_part_core (ocf_core_t core, ocf_part_id_t part_id, struct ocf_stats_usage *usage, struct ocf_stats_requests *req, struct ocf_stats_blocks *blocks)
 
int ocf_stats_collect_part_cache (ocf_cache_t cache, ocf_part_id_t part_id, struct ocf_stats_usage *usage, struct ocf_stats_requests *req, struct ocf_stats_blocks *blocks)
 
void ocf_core_stats_initialize (ocf_core_t core)
 Initialize or reset core statistics. More...
 
void ocf_core_stats_initialize_all (ocf_cache_t cache)
 Initialize or reset statistics of all cores in cache. More...
 

Detailed Description

OCF API for updating and reseting statistics.

This file contains routines pertaining to manipulation of OCF IO statistics.

Function Documentation

◆ ocf_core_stats_initialize()

void ocf_core_stats_initialize ( ocf_core_t  core)

Initialize or reset core statistics.

Initialize or reset counters used for statistics.

Parameters
[in]coreCore handle

◆ ocf_core_stats_initialize_all()

void ocf_core_stats_initialize_all ( ocf_cache_t  cache)

Initialize or reset statistics of all cores in cache.

Initialize or reset counters used for statistics.

Parameters
[in]cacheCache handle

◆ ocf_stats_collect_cache()

int ocf_stats_collect_cache ( ocf_cache_t  cache,
struct ocf_stats_usage usage,
struct ocf_stats_requests req,
struct ocf_stats_blocks blocks,
struct ocf_stats_errors errors 
)
Parameters
Collectstatistics for given cache
cacheCache instance for which statistics will be collected
usageUsage statistics
reqRequest statistics
blocksBlocks statistics
errorsErrors statistics
Return values
0Success
Non-zeroError

◆ ocf_stats_collect_core()

int ocf_stats_collect_core ( ocf_core_t  core,
struct ocf_stats_usage usage,
struct ocf_stats_requests req,
struct ocf_stats_blocks blocks,
struct ocf_stats_errors errors 
)
Parameters
Collectstatistics for given core
coreCore for which statistics will be collected
usageUsage statistics
reqRequest statistics
blocksBlocks statistics
errorsErrors statistics
Return values
0Success
Non-zeroError

◆ ocf_stats_collect_part_cache()

int ocf_stats_collect_part_cache ( ocf_cache_t  cache,
ocf_part_id_t  part_id,
struct ocf_stats_usage usage,
struct ocf_stats_requests req,
struct ocf_stats_blocks blocks 
)
Parameters
Collectstatistics for given ioclass
cacheCache instance for which statistics will be collected
part_idIoclass id for which statistics will be collected
usageUsage statistics
reqRequest statistics
blocksBlocks statistics
Return values
0Success
Non-zeroError

◆ ocf_stats_collect_part_core()

int ocf_stats_collect_part_core ( ocf_core_t  core,
ocf_part_id_t  part_id,
struct ocf_stats_usage usage,
struct ocf_stats_requests req,
struct ocf_stats_blocks blocks 
)
Parameters
Collectstatistics for given ioclass
coreCore handle for which statistics will be collected
part_idIoclass id for which statistics will be collected
usageUsage statistics
reqRequest statistics
blocksBlocks statistics
Return values
0Success
Non-zeroError