summaryrefslogtreecommitdiff
path: root/examples/redis-unstable/src/commands/cluster-slot-stats.json
blob: 1043ecdf7aff4b26a74b2f613ba71f24a65b4aa7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
    "SLOT-STATS": {
        "summary": "Return an array of slot usage statistics for slots assigned to the current node.",
        "complexity": "O(N) where N is the total number of slots based on arguments. O(N*log(N)) with ORDERBY subcommand.",
        "group": "cluster",
        "since": "8.2.0",
        "arity": -4,
        "container": "CLUSTER",
        "function": "clusterSlotStatsCommand",
        "command_flags": [
            "STALE",
            "LOADING"
        ],
        "command_tips": [
            "NONDETERMINISTIC_OUTPUT",
            "REQUEST_POLICY:ALL_SHARDS"
        ],
        "reply_schema": {
            "type": "array",
            "description": "Array of nested arrays, where the inner array element represents a slot and its respective usage statistics.",
            "items": {
                "type": "array",
                "description": "Array of size 2, where 0th index represents (int) slot and 1st index represents (map) usage statistics.",
                "minItems": 2,
                "maxItems": 2,
                "items": [
                    {
                        "description": "Slot Number.",
                        "type": "integer"
                    },
                    {
                        "type": "object",
                        "description": "Map of slot usage statistics.",
                        "additionalProperties": false,
                        "properties": {
                            "key-count": {
                                "type": "integer"
                            },
                            "memory-bytes": {
                                "type": "integer"
                            },
                            "cpu-usec": {
                                "type": "integer"
                            },
                            "network-bytes-in": {
                                "type": "integer"
                            },
                            "network-bytes-out": {
                                "type": "integer"
                            }
                        }
                    }
                ]
            }
        },
        "arguments": [
            {
                "name": "filter",
                "type": "oneof",
                "arguments": [
                    {
                        "token": "SLOTSRANGE",
                        "name": "slotsrange",
                        "type": "block",
                        "arguments": [
                            {
                                "name": "start-slot",
                                "type": "integer"
                            },
                            {
                                "name": "end-slot",
                                "type": "integer"
                            }
                        ]
                    },
                    {
                        "token": "ORDERBY",
                        "name": "orderby",
                        "type": "block",
                        "arguments": [
                            {
                                "name": "metric",
                                "type": "string"
                            },
                            {
                                "token": "LIMIT",
                                "name": "limit",
                                "type": "integer",
                                "optional": true
                            },
                            {
                                "name": "order",
                                "type": "oneof",
                                "optional": true,
                                "arguments": [
                                    {
                                        "name": "asc",
                                        "type": "pure-token",
                                        "token": "ASC"
                                    },
                                    {
                                        "name": "desc",
                                        "type": "pure-token",
                                        "token": "DESC"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ]
    }
}