]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/ocf/tests/functional/pyocf/types/stats/shared.py
import 15.2.0 Octopus source
[ceph.git] / ceph / src / spdk / ocf / tests / functional / pyocf / types / stats / shared.py
1 #
2 # Copyright(c) 2019 Intel Corporation
3 # SPDX-License-Identifier: BSD-3-Clause-Clear
4 #
5
6 from ctypes import c_uint64, c_uint32, Structure
7
8
9 class _Stat(Structure):
10 _fields_ = [("value", c_uint64), ("permil", c_uint64)]
11
12
13 class OcfStatsReq(Structure):
14 _fields_ = [
15 ("partial_miss", c_uint64),
16 ("full_miss", c_uint64),
17 ("total", c_uint64),
18 ("pass_through", c_uint64),
19 ]
20
21
22 class OcfStatsBlock(Structure):
23 _fields_ = [("read", c_uint64), ("write", c_uint64)]
24
25
26 class OcfStatsError(Structure):
27 _fields_ = [("read", c_uint32), ("write", c_uint32)]
28
29
30 class OcfStatsDebug(Structure):
31 _fields_ = [
32 ("read_size", c_uint64 * 12),
33 ("write_size", c_uint64 * 12),
34 ("read_align", c_uint64 * 4),
35 ("write_align", c_uint64 * 4),
36 ]
37
38
39 class UsageStats(Structure):
40 _fields_ = [
41 ("occupancy", _Stat),
42 ("free", _Stat),
43 ("clean", _Stat),
44 ("dirty", _Stat),
45 ]
46
47
48 class RequestsStats(Structure):
49 _fields_ = [
50 ("rd_hits", _Stat),
51 ("rd_partial_misses", _Stat),
52 ("rd_full_misses", _Stat),
53 ("rd_total", _Stat),
54 ("wr_hits", _Stat),
55 ("wr_partial_misses", _Stat),
56 ("wr_full_misses", _Stat),
57 ("wr_total", _Stat),
58 ("rd_pt", _Stat),
59 ("wr_pt", _Stat),
60 ("serviced", _Stat),
61 ("total", _Stat),
62 ]
63
64
65 class BlocksStats(Structure):
66 _fields_ = [
67 ("core_volume_rd", _Stat),
68 ("core_volume_wr", _Stat),
69 ("core_volume_total", _Stat),
70 ("cache_volume_rd", _Stat),
71 ("cache_volume_wr", _Stat),
72 ("cache_volume_total", _Stat),
73 ("volume_rd", _Stat),
74 ("volume_wr", _Stat),
75 ("volume_total", _Stat),
76 ]
77
78
79 class ErrorsStats(Structure):
80 _fields_ = [
81 ("core_volume_rd", _Stat),
82 ("core_volume_wr", _Stat),
83 ("core_volume_total", _Stat),
84 ("cache_volume_rd", _Stat),
85 ("cache_volume_wr", _Stat),
86 ("cache_volume_total", _Stat),
87 ("total", _Stat),
88 ]