Open CAS Framework
Open source framework of Cache Acceleration Software
ocf_stats.h
Go to the documentation of this file.
1 /*
2  * Copyright(c) 2012-2020 Intel Corporation
3  * SPDX-License-Identifier: BSD-3-Clause-Clear
4  */
5 
13 #ifndef __OCF_STATS_H__
14 #define __OCF_STATS_H__
15 
19 struct ocf_stat {
21  uint64_t value;
23  uint64_t fraction;
24 };
25 
42  struct ocf_stat occupancy;
43  struct ocf_stat free;
44  struct ocf_stat clean;
45  struct ocf_stat dirty;
46 };
47 
75  struct ocf_stat rd_hits;
76  struct ocf_stat rd_partial_misses;
77  struct ocf_stat rd_full_misses;
78  struct ocf_stat rd_total;
79  struct ocf_stat wr_hits;
80  struct ocf_stat wr_partial_misses;
81  struct ocf_stat wr_full_misses;
82  struct ocf_stat wr_total;
83  struct ocf_stat rd_pt;
84  struct ocf_stat wr_pt;
85  struct ocf_stat serviced;
86  struct ocf_stat total;
87 };
88 
112  struct ocf_stat core_volume_rd;
113  struct ocf_stat core_volume_wr;
114  struct ocf_stat core_volume_total;
115  struct ocf_stat cache_volume_rd;
116  struct ocf_stat cache_volume_wr;
117  struct ocf_stat cache_volume_total;
118  struct ocf_stat volume_rd;
119  struct ocf_stat volume_wr;
120  struct ocf_stat volume_total;
121 };
122 
144  struct ocf_stat core_volume_rd;
145  struct ocf_stat core_volume_wr;
146  struct ocf_stat core_volume_total;
147  struct ocf_stat cache_volume_rd;
148  struct ocf_stat cache_volume_wr;
149  struct ocf_stat cache_volume_total;
150  struct ocf_stat total;
151 };
152 
166  struct ocf_stats_usage *usage,
167  struct ocf_stats_requests *req,
168  struct ocf_stats_blocks *blocks,
169  struct ocf_stats_errors *errors);
170 
184  struct ocf_stats_usage *usage,
185  struct ocf_stats_requests *req,
186  struct ocf_stats_blocks *blocks,
187  struct ocf_stats_errors *errors);
188 
202  struct ocf_stats_usage *usage, struct ocf_stats_requests *req,
203  struct ocf_stats_blocks *blocks);
204 
218  struct ocf_stats_usage *usage, struct ocf_stats_requests *req,
219  struct ocf_stats_blocks *blocks);
220 
229 
238 
239 #endif /* __OCF_STATS_H__ */
struct ocf_cache * ocf_cache_t
handle to object designating ocf cache device
Definition: ocf_types.h:44
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)
uint16_t ocf_part_id_t
partition id type (by default designated as 16 bit unsigned integer)
Definition: ocf_types.h:33
Block statistics.
Definition: ocf_stats.h:111
void ocf_core_stats_initialize_all(ocf_cache_t cache)
Initialize or reset statistics of all cores in cache.
Errors statistics.
Definition: ocf_stats.h:143
uint64_t fraction
Definition: ocf_stats.h:23
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)
void ocf_core_stats_initialize(ocf_core_t core)
Initialize or reset core statistics.
Definition: ocf_stats.h:19
struct ocf_core * ocf_core_t
handle to object designating ocf core object
Definition: ocf_types.h:50
Requests statistcs.
Definition: ocf_stats.h:74
Usage statistics in 4 KiB unit.
Definition: ocf_stats.h:41
uint64_t value
Definition: ocf_stats.h:21