@@ -16,14 +16,91 @@ type CodisModelInfo struct {
1616 Servers []CodisServerInfo `json:"servers"`
1717}
1818
19+ type CodisProxyModelInfo struct {
20+ Id int `json:"id"`
21+ AdminAddr string `json:"admin_addr"`
22+ ProductName string `json:"product_name"`
23+ DataCenter string `json:"data_center"`
24+ }
25+
1926type CodisGroupInfo struct {
2027 Models []CodisModelInfo `json:"models"`
2128}
2229
30+ type CodisProxyInfo struct {
31+ Models []CodisProxyModelInfo `json:"models"`
32+ }
33+
2334type CodisStatsInfo struct {
2435 Group CodisGroupInfo `json:"group"`
36+ Proxy CodisProxyInfo `json:"proxy"`
2537}
2638
2739type CodisTopomInfo struct {
2840 Stats CodisStatsInfo `json:"stats"`
2941}
42+
43+ type RedisInfo struct {
44+ Errors int `json:"errors"`
45+ }
46+
47+ type CmdInfo struct {
48+ Opstr string `json:"opstr"`
49+ Calls int64 `json:"calls"`
50+ Usecs_percall int64 `json:"usecs_percall"`
51+ Fails int64 `json:"fails"`
52+ MaxDelay int64 `json:"max_delay"`
53+ }
54+
55+ type ProxyOpsInfo struct {
56+ Total int `json:"total"`
57+ Fails int `json:"fails"`
58+ Redis RedisInfo `json:"redis"`
59+ Qps int `json:"qps"`
60+ Cmd []CmdInfo `json:"cmd"`
61+ }
62+
63+ type RowInfo struct {
64+ Utime int64 `json:"utime"`
65+ Stime int64 `json:"stime"`
66+ MaxRss int64 `json:"max_rss"`
67+ IxRss int64 `json:"ix_rss"`
68+ IdRss int64 `json:"id_rss"`
69+ IsRss int64 `json:"is_rss"`
70+ }
71+
72+ type RusageInfo struct {
73+ Now string `json:"now"`
74+ Cpu float64 `json:"cpu"`
75+ Mem float64 `json:"mem"`
76+ Raw RowInfo `json:"raw"`
77+ }
78+
79+ type GeneralInfo struct {
80+ Alloc int64 `json:"alloc"`
81+ Sys int64 `json:"sys"`
82+ Lookups int64 `json:"lookups"`
83+ Mallocs int64 `json:"mallocs"`
84+ Frees int64 `json:"frees"`
85+ }
86+
87+ type HeapInfo struct {
88+ Alloc int64 `json:"alloc"`
89+ Sys int64 `json:"sys"`
90+ Idle int64 `json:"idle"`
91+ Inuse int64 `json:"inuse"`
92+ Objects int64 `json:"objects"`
93+ }
94+
95+ type RunTimeInfo struct {
96+ General GeneralInfo `json:"general"`
97+ Heap HeapInfo `json:"heap"`
98+ }
99+
100+ type ProxyStats struct {
101+ Online bool `json:"online"`
102+ Ops ProxyOpsInfo `json:"ops"`
103+ Rusage RusageInfo `json:"rusage"`
104+ RunTime RunTimeInfo `json:"runtime"`
105+ SlowCmdCount int64 `json:"slow_cmd_count"`
106+ }
0 commit comments