| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | package proxysql |
| 4 | |
| 5 | import ( |
| 6 | "bufio" |
| 7 | "bytes" |
| 8 | "context" |
| 9 | "database/sql/driver" |
| 10 | "errors" |
| 11 | "fmt" |
| 12 | "os" |
| 13 | "strings" |
| 14 | "testing" |
| 15 | |
| 16 | "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/collecttest" |
| 17 | |
| 18 | "github.com/DATA-DOG/go-sqlmock" |
| 19 | "github.com/stretchr/testify/assert" |
| 20 | "github.com/stretchr/testify/require" |
| 21 | ) |
| 22 | |
| 23 | var ( |
| 24 | dataConfigJSON, _ = os.ReadFile("testdata/config.json") |
| 25 | dataConfigYAML, _ = os.ReadFile("testdata/config.yaml") |
| 26 | |
| 27 | dataVer2010Version, _ = os.ReadFile("testdata/v2.0.10/version.txt") |
| 28 | dataVer2010StatsMySQLGlobal, _ = os.ReadFile("testdata/v2.0.10/stats_mysql_global.txt") |
| 29 | dataVer2010StatsMemoryMetrics, _ = os.ReadFile("testdata/v2.0.10/stats_memory_metrics.txt") |
| 30 | dataVer2010StatsMySQLCommandsCounters, _ = os.ReadFile("testdata/v2.0.10/stats_mysql_commands_counters.txt") |
| 31 | dataVer2010StatsMySQLUsers, _ = os.ReadFile("testdata/v2.0.10/stats_mysql_users.txt") |
| 32 | dataVer2010StatsMySQLConnectionPool, _ = os.ReadFile("testdata/v2.0.10/stats_mysql_connection_pool .txt") |
| 33 | ) |
| 34 | |
| 35 | func Test_testDataIsValid(t *testing.T) { |
| 36 | for name, data := range map[string][]byte{ |
| 37 | "dataConfigJSON": dataConfigJSON, |
| 38 | "dataConfigYAML": dataConfigYAML, |
| 39 | "dataVer2010Version": dataVer2010Version, |
| 40 | "dataVer2010StatsMySQLGlobal": dataVer2010StatsMySQLGlobal, |
| 41 | "dataVer2010StatsMemoryMetrics": dataVer2010StatsMemoryMetrics, |
| 42 | "dataVer2010StatsMySQLCommandsCounters": dataVer2010StatsMySQLCommandsCounters, |
| 43 | "dataVer2010StatsMySQLUsers": dataVer2010StatsMySQLUsers, |
| 44 | "dataVer2010StatsMySQLConnectionPool": dataVer2010StatsMySQLConnectionPool, |
| 45 | } { |
| 46 | require.NotNil(t, data, name) |
| 47 | _, err := prepareMockRows(data) |
| 48 | require.NoError(t, err, name) |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | func TestCollector_ConfigurationSerialize(t *testing.T) { |
| 53 | collecttest.TestConfigurationSerialize(t, &Collector{}, dataConfigJSON, dataConfigYAML) |
| 54 | } |
| 55 | |
| 56 | func TestCollector_Init(t *testing.T) { |
| 57 | tests := map[string]struct { |
| 58 | config Config |
| 59 | wantFail bool |
| 60 | }{ |
| 61 | "default": { |
| 62 | wantFail: false, |
| 63 | config: New().Config, |
| 64 | }, |
| 65 | "empty DSN": { |
| 66 | wantFail: true, |
| 67 | config: Config{DSN: ""}, |
| 68 | }, |
| 69 | } |
| 70 | |
| 71 | for name, test := range tests { |
| 72 | t.Run(name, func(t *testing.T) { |
| 73 | collr := New() |
| 74 | collr.Config = test.config |
| 75 | |
| 76 | if test.wantFail { |
| 77 | assert.Error(t, collr.Init(context.Background())) |
| 78 | } else { |
| 79 | assert.NoError(t, collr.Init(context.Background())) |
| 80 | } |
| 81 | }) |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | func TestCollector_Cleanup(t *testing.T) { |
| 86 | tests := map[string]func(t *testing.T) (collr *Collector, cleanup func()){ |
| 87 | "db connection not initialized": func(t *testing.T) (collr *Collector, cleanup func()) { |
| 88 | return New(), func() {} |
| 89 | }, |
| 90 | "db connection initialized": func(t *testing.T) (collr *Collector, cleanup func()) { |
| 91 | db, mock, err := sqlmock.New() |
| 92 | require.NoError(t, err) |
| 93 | |
| 94 | mock.ExpectClose() |
| 95 | collr = New() |
| 96 | collr.db = db |
| 97 | cleanup = func() { _ = db.Close() } |
| 98 | |
| 99 | return collr, cleanup |
| 100 | }, |
| 101 | } |
| 102 | |
| 103 | for name, prepare := range tests { |
| 104 | t.Run(name, func(t *testing.T) { |
| 105 | collr, cleanup := prepare(t) |
| 106 | defer cleanup() |
| 107 | |
| 108 | assert.NotPanics(t, func() { collr.Cleanup(context.Background()) }) |
| 109 | assert.Nil(t, collr.db) |
| 110 | }) |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | func TestCollector_Charts(t *testing.T) { |
| 115 | assert.NotNil(t, New().Charts()) |
| 116 | } |
| 117 | |
| 118 | func TestCollector_Check(t *testing.T) { |
| 119 | tests := map[string]struct { |
| 120 | prepareMock func(t *testing.T, m sqlmock.Sqlmock) |
| 121 | wantFail bool |
| 122 | }{ |
| 123 | "success on all queries": { |
| 124 | wantFail: false, |
| 125 | prepareMock: func(t *testing.T, m sqlmock.Sqlmock) { |
| 126 | mockExpect(t, m, queryVersion, dataVer2010Version) |
| 127 | mockExpect(t, m, queryStatsMySQLGlobal, dataVer2010StatsMySQLGlobal) |
| 128 | mockExpect(t, m, queryStatsMySQLMemoryMetrics, dataVer2010StatsMemoryMetrics) |
| 129 | mockExpect(t, m, queryStatsMySQLCommandsCounters, dataVer2010StatsMySQLCommandsCounters) |
| 130 | mockExpect(t, m, queryStatsMySQLUsers, dataVer2010StatsMySQLUsers) |
| 131 | mockExpect(t, m, queryStatsMySQLConnectionPool, dataVer2010StatsMySQLConnectionPool) |
| 132 | }, |
| 133 | }, |
| 134 | "fails when error on querying global stats": { |
| 135 | wantFail: true, |
| 136 | prepareMock: func(t *testing.T, m sqlmock.Sqlmock) { |
| 137 | mockExpect(t, m, queryVersion, dataVer2010Version) |
| 138 | mockExpectErr(m, queryStatsMySQLGlobal) |
| 139 | }, |
| 140 | }, |
| 141 | "fails when error on querying memory metrics": { |
| 142 | wantFail: true, |
| 143 | prepareMock: func(t *testing.T, m sqlmock.Sqlmock) { |
| 144 | mockExpect(t, m, queryVersion, dataVer2010Version) |
| 145 | mockExpect(t, m, queryStatsMySQLGlobal, dataVer2010StatsMySQLGlobal) |
| 146 | mockExpectErr(m, queryStatsMySQLMemoryMetrics) |
| 147 | }, |
| 148 | }, |
| 149 | "fails when error on querying mysql command counters": { |
| 150 | wantFail: true, |
| 151 | prepareMock: func(t *testing.T, m sqlmock.Sqlmock) { |
| 152 | mockExpect(t, m, queryVersion, dataVer2010Version) |
| 153 | mockExpect(t, m, queryStatsMySQLGlobal, dataVer2010StatsMySQLGlobal) |
| 154 | mockExpect(t, m, queryStatsMySQLMemoryMetrics, dataVer2010StatsMemoryMetrics) |
| 155 | mockExpectErr(m, queryStatsMySQLCommandsCounters) |
| 156 | }, |
| 157 | }, |
| 158 | "fails when error on querying mysql users": { |
| 159 | wantFail: true, |
| 160 | prepareMock: func(t *testing.T, m sqlmock.Sqlmock) { |
| 161 | mockExpect(t, m, queryVersion, dataVer2010Version) |
| 162 | mockExpect(t, m, queryStatsMySQLGlobal, dataVer2010StatsMySQLGlobal) |
| 163 | mockExpect(t, m, queryStatsMySQLMemoryMetrics, dataVer2010StatsMemoryMetrics) |
| 164 | mockExpect(t, m, queryStatsMySQLCommandsCounters, dataVer2010StatsMySQLCommandsCounters) |
| 165 | mockExpectErr(m, queryStatsMySQLUsers) |
| 166 | }, |
| 167 | }, |
| 168 | } |
| 169 | |
| 170 | for name, test := range tests { |
| 171 | t.Run(name, func(t *testing.T) { |
| 172 | db, mock, err := sqlmock.New( |
| 173 | sqlmock.QueryMatcherOption(sqlmock.QueryMatcherEqual), |
| 174 | ) |
| 175 | require.NoError(t, err) |
| 176 | collr := New() |
| 177 | collr.db = db |
| 178 | defer func() { _ = db.Close() }() |
| 179 | |
| 180 | require.NoError(t, collr.Init(context.Background())) |
| 181 | |
| 182 | test.prepareMock(t, mock) |
| 183 | |
| 184 | if test.wantFail { |
| 185 | assert.Error(t, collr.Check(context.Background())) |
| 186 | } else { |
| 187 | assert.NoError(t, collr.Check(context.Background())) |
| 188 | } |
| 189 | assert.NoError(t, mock.ExpectationsWereMet()) |
| 190 | }) |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | func TestCollector_Collect(t *testing.T) { |
| 195 | type testCaseStep struct { |
| 196 | prepareMock func(t *testing.T, m sqlmock.Sqlmock) |
| 197 | check func(t *testing.T, my *Collector) |
| 198 | } |
| 199 | tests := map[string][]testCaseStep{ |
| 200 | |
| 201 | "success on all queries (v2.0.10)": { |
| 202 | { |
| 203 | prepareMock: func(t *testing.T, m sqlmock.Sqlmock) { |
| 204 | mockExpect(t, m, queryVersion, dataVer2010Version) |
| 205 | mockExpect(t, m, queryStatsMySQLGlobal, dataVer2010StatsMySQLGlobal) |
| 206 | mockExpect(t, m, queryStatsMySQLMemoryMetrics, dataVer2010StatsMemoryMetrics) |
| 207 | mockExpect(t, m, queryStatsMySQLCommandsCounters, dataVer2010StatsMySQLCommandsCounters) |
| 208 | mockExpect(t, m, queryStatsMySQLUsers, dataVer2010StatsMySQLUsers) |
| 209 | mockExpect(t, m, queryStatsMySQLConnectionPool, dataVer2010StatsMySQLConnectionPool) |
| 210 | }, |
| 211 | check: func(t *testing.T, my *Collector) { |
| 212 | mx := my.Collect(context.Background()) |
| 213 | |
| 214 | expected := map[string]int64{ |
| 215 | "Access_Denied_Max_Connections": 0, |
| 216 | "Access_Denied_Max_User_Connections": 0, |
| 217 | "Access_Denied_Wrong_Password": 2, |
| 218 | "Active_Transactions": 0, |
| 219 | "Auth_memory": 1044, |
| 220 | "Backend_query_time_nsec": 0, |
| 221 | "Client_Connections_aborted": 2, |
| 222 | "Client_Connections_connected": 3, |
| 223 | "Client_Connections_created": 5458991, |
| 224 | "Client_Connections_hostgroup_locked": 0, |
| 225 | "Client_Connections_non_idle": 3, |
| 226 | "Com_autocommit": 0, |
| 227 | "Com_autocommit_filtered": 0, |
| 228 | "Com_backend_change_user": 188694, |
| 229 | "Com_backend_init_db": 0, |
| 230 | "Com_backend_set_names": 1517893, |
| 231 | "Com_backend_stmt_close": 0, |
| 232 | "Com_backend_stmt_execute": 36303146, |
| 233 | "Com_backend_stmt_prepare": 16858208, |
| 234 | "Com_commit": 0, |
| 235 | "Com_commit_filtered": 0, |
| 236 | "Com_frontend_init_db": 2, |
| 237 | "Com_frontend_set_names": 0, |
| 238 | "Com_frontend_stmt_close": 32137933, |
| 239 | "Com_frontend_stmt_execute": 36314138, |
| 240 | "Com_frontend_stmt_prepare": 32185987, |
| 241 | "Com_frontend_use_db": 0, |
| 242 | "Com_rollback": 0, |
| 243 | "Com_rollback_filtered": 0, |
| 244 | "ConnPool_get_conn_failure": 212943, |
| 245 | "ConnPool_get_conn_immediate": 13361, |
| 246 | "ConnPool_get_conn_latency_awareness": 0, |
| 247 | "ConnPool_get_conn_success": 36319474, |
| 248 | "ConnPool_memory_bytes": 932248, |
| 249 | "GTID_consistent_queries": 0, |
| 250 | "GTID_session_collected": 0, |
| 251 | "Mirror_concurrency": 0, |
| 252 | "Mirror_queue_length": 0, |
| 253 | "MyHGM_myconnpoll_destroy": 15150, |
| 254 | "MyHGM_myconnpoll_get": 36519056, |
| 255 | "MyHGM_myconnpoll_get_ok": 36306113, |
| 256 | "MyHGM_myconnpoll_push": 37358734, |
| 257 | "MyHGM_myconnpoll_reset": 2, |
| 258 | "MySQL_Monitor_Workers": 10, |
| 259 | "MySQL_Monitor_Workers_Aux": 0, |
| 260 | "MySQL_Monitor_Workers_Started": 10, |
| 261 | "MySQL_Monitor_connect_check_ERR": 130, |
| 262 | "MySQL_Monitor_connect_check_OK": 3548306, |
| 263 | "MySQL_Monitor_ping_check_ERR": 108271, |
| 264 | "MySQL_Monitor_ping_check_OK": 21289849, |
| 265 | "MySQL_Monitor_read_only_check_ERR": 19610, |
| 266 | "MySQL_Monitor_read_only_check_OK": 106246409, |
| 267 | "MySQL_Monitor_replication_lag_check_ERR": 482, |
| 268 | "MySQL_Monitor_replication_lag_check_OK": 28702388, |
| 269 | "MySQL_Thread_Workers": 4, |
| 270 | "ProxySQL_Uptime": 26748286, |
| 271 | "Queries_backends_bytes_recv": 5896210168, |
| 272 | "Queries_backends_bytes_sent": 4329581500, |
| 273 | "Queries_frontends_bytes_recv": 7434816962, |
| 274 | "Queries_frontends_bytes_sent": 11643634097, |
| 275 | "Query_Cache_Entries": 0, |
| 276 | "Query_Cache_Memory_bytes": 0, |
| 277 | "Query_Cache_Purged": 0, |
| 278 | "Query_Cache_bytes_IN": 0, |
| 279 | "Query_Cache_bytes_OUT": 0, |
| 280 | "Query_Cache_count_GET": 0, |
| 281 | "Query_Cache_count_GET_OK": 0, |
| 282 | "Query_Cache_count_SET": 0, |
| 283 | "Query_Processor_time_nsec": 0, |
| 284 | "Questions": 100638067, |
| 285 | "SQLite3_memory_bytes": 6017144, |
| 286 | "Selects_for_update__autocommit0": 0, |
| 287 | "Server_Connections_aborted": 9979, |
| 288 | "Server_Connections_connected": 13, |
| 289 | "Server_Connections_created": 2122254, |
| 290 | "Server_Connections_delayed": 0, |
| 291 | "Servers_table_version": 37, |
| 292 | "Slow_queries": 405818, |
| 293 | "Stmt_Cached": 65, |
| 294 | "Stmt_Client_Active_Total": 18, |
| 295 | "Stmt_Client_Active_Unique": 18, |
| 296 | "Stmt_Max_Stmt_id": 66, |
| 297 | "Stmt_Server_Active_Total": 101, |
| 298 | "Stmt_Server_Active_Unique": 39, |
| 299 | "automatic_detected_sql_injection": 0, |
| 300 | "aws_aurora_replicas_skipped_during_query": 0, |
| 301 | "backend_10_back001-db-master_6001_Bytes_data_recv": 145193069937, |
| 302 | "backend_10_back001-db-master_6001_Bytes_data_sent": 9858463664, |
| 303 | "backend_10_back001-db-master_6001_ConnERR": 0, |
| 304 | "backend_10_back001-db-master_6001_ConnFree": 423, |
| 305 | "backend_10_back001-db-master_6001_ConnOK": 524, |
| 306 | "backend_10_back001-db-master_6001_ConnUsed": 69, |
| 307 | "backend_10_back001-db-master_6001_Latency_us": 17684, |
| 308 | "backend_10_back001-db-master_6001_Queries": 8970367, |
| 309 | "backend_10_back001-db-master_6001_status_OFFLINE_HARD": 0, |
| 310 | "backend_10_back001-db-master_6001_status_OFFLINE_SOFT": 0, |
| 311 | "backend_10_back001-db-master_6001_status_ONLINE": 1, |
| 312 | "backend_10_back001-db-master_6001_status_SHUNNED": 0, |
| 313 | "backend_11_back001-db-master_6002_Bytes_data_recv": 2903, |
| 314 | "backend_11_back001-db-master_6002_Bytes_data_sent": 187675, |
| 315 | "backend_11_back001-db-master_6002_ConnERR": 0, |
| 316 | "backend_11_back001-db-master_6002_ConnFree": 1, |
| 317 | "backend_11_back001-db-master_6002_ConnOK": 1, |
| 318 | "backend_11_back001-db-master_6002_ConnUsed": 0, |
| 319 | "backend_11_back001-db-master_6002_Latency_us": 17684, |
| 320 | "backend_11_back001-db-master_6002_Queries": 69, |
| 321 | "backend_11_back001-db-master_6002_status_OFFLINE_HARD": 0, |
| 322 | "backend_11_back001-db-master_6002_status_OFFLINE_SOFT": 0, |
| 323 | "backend_11_back001-db-master_6002_status_ONLINE": 1, |
| 324 | "backend_11_back001-db-master_6002_status_SHUNNED": 0, |
| 325 | "backend_11_back001-db-reader_6003_Bytes_data_recv": 4994101, |
| 326 | "backend_11_back001-db-reader_6003_Bytes_data_sent": 163690013, |
| 327 | "backend_11_back001-db-reader_6003_ConnERR": 0, |
| 328 | "backend_11_back001-db-reader_6003_ConnFree": 11, |
| 329 | "backend_11_back001-db-reader_6003_ConnOK": 11, |
| 330 | "backend_11_back001-db-reader_6003_ConnUsed": 0, |
| 331 | "backend_11_back001-db-reader_6003_Latency_us": 113, |
| 332 | "backend_11_back001-db-reader_6003_Queries": 63488, |
| 333 | "backend_11_back001-db-reader_6003_status_OFFLINE_HARD": 0, |
| 334 | "backend_11_back001-db-reader_6003_status_OFFLINE_SOFT": 0, |
| 335 | "backend_11_back001-db-reader_6003_status_ONLINE": 1, |
| 336 | "backend_11_back001-db-reader_6003_status_SHUNNED": 0, |
| 337 | "backend_20_back002-db-master_6004_Bytes_data_recv": 266034339, |
| 338 | "backend_20_back002-db-master_6004_Bytes_data_sent": 1086994186, |
| 339 | "backend_20_back002-db-master_6004_ConnERR": 2, |
| 340 | "backend_20_back002-db-master_6004_ConnFree": 188, |
| 341 | "backend_20_back002-db-master_6004_ConnOK": 197, |
| 342 | "backend_20_back002-db-master_6004_ConnUsed": 9, |
| 343 | "backend_20_back002-db-master_6004_Latency_us": 101981, |
| 344 | "backend_20_back002-db-master_6004_Queries": 849461, |
| 345 | "backend_20_back002-db-master_6004_status_OFFLINE_HARD": 0, |
| 346 | "backend_20_back002-db-master_6004_status_OFFLINE_SOFT": 0, |
| 347 | "backend_20_back002-db-master_6004_status_ONLINE": 1, |
| 348 | "backend_20_back002-db-master_6004_status_SHUNNED": 0, |
| 349 | "backend_21_back002-db-reader_6005_Bytes_data_recv": 984, |
| 350 | "backend_21_back002-db-reader_6005_Bytes_data_sent": 6992, |
| 351 | "backend_21_back002-db-reader_6005_ConnERR": 0, |
| 352 | "backend_21_back002-db-reader_6005_ConnFree": 1, |
| 353 | "backend_21_back002-db-reader_6005_ConnOK": 1, |
| 354 | "backend_21_back002-db-reader_6005_ConnUsed": 0, |
| 355 | "backend_21_back002-db-reader_6005_Latency_us": 230, |
| 356 | "backend_21_back002-db-reader_6005_Queries": 8, |
| 357 | "backend_21_back002-db-reader_6005_status_OFFLINE_HARD": 1, |
| 358 | "backend_21_back002-db-reader_6005_status_OFFLINE_SOFT": 0, |
| 359 | "backend_21_back002-db-reader_6005_status_ONLINE": 0, |
| 360 | "backend_21_back002-db-reader_6005_status_SHUNNED": 0, |
| 361 | "backend_31_back003-db-master_6006_Bytes_data_recv": 81438709, |
| 362 | "backend_31_back003-db-master_6006_Bytes_data_sent": 712803, |
| 363 | "backend_31_back003-db-master_6006_ConnERR": 0, |
| 364 | "backend_31_back003-db-master_6006_ConnFree": 3, |
| 365 | "backend_31_back003-db-master_6006_ConnOK": 3, |
| 366 | "backend_31_back003-db-master_6006_ConnUsed": 0, |
| 367 | "backend_31_back003-db-master_6006_Latency_us": 231, |
| 368 | "backend_31_back003-db-master_6006_Queries": 3276, |
| 369 | "backend_31_back003-db-master_6006_status_OFFLINE_HARD": 0, |
| 370 | "backend_31_back003-db-master_6006_status_OFFLINE_SOFT": 1, |
| 371 | "backend_31_back003-db-master_6006_status_ONLINE": 0, |
| 372 | "backend_31_back003-db-master_6006_status_SHUNNED": 0, |
| 373 | "backend_31_back003-db-reader_6007_Bytes_data_recv": 115810708275, |
| 374 | "backend_31_back003-db-reader_6007_Bytes_data_sent": 411900849, |
| 375 | "backend_31_back003-db-reader_6007_ConnERR": 0, |
| 376 | "backend_31_back003-db-reader_6007_ConnFree": 70, |
| 377 | "backend_31_back003-db-reader_6007_ConnOK": 71, |
| 378 | "backend_31_back003-db-reader_6007_ConnUsed": 1, |
| 379 | "backend_31_back003-db-reader_6007_Latency_us": 230, |
| 380 | "backend_31_back003-db-reader_6007_Queries": 2356904, |
| 381 | "backend_31_back003-db-reader_6007_status_OFFLINE_HARD": 0, |
| 382 | "backend_31_back003-db-reader_6007_status_OFFLINE_SOFT": 0, |
| 383 | "backend_31_back003-db-reader_6007_status_ONLINE": 0, |
| 384 | "backend_31_back003-db-reader_6007_status_SHUNNED": 1, |
| 385 | "backend_lagging_during_query": 8880, |
| 386 | "backend_offline_during_query": 8, |
| 387 | "generated_error_packets": 231, |
| 388 | "hostgroup_10_backends_OFFLINE_HARD": 0, |
| 389 | "hostgroup_10_backends_OFFLINE_SOFT": 0, |
| 390 | "hostgroup_10_backends_ONLINE": 1, |
| 391 | "hostgroup_10_backends_SHUNNED": 0, |
| 392 | "hostgroup_11_backends_OFFLINE_HARD": 0, |
| 393 | "hostgroup_11_backends_OFFLINE_SOFT": 0, |
| 394 | "hostgroup_11_backends_ONLINE": 2, |
| 395 | "hostgroup_11_backends_SHUNNED": 0, |
| 396 | "hostgroup_20_backends_OFFLINE_HARD": 0, |
| 397 | "hostgroup_20_backends_OFFLINE_SOFT": 0, |
| 398 | "hostgroup_20_backends_ONLINE": 1, |
| 399 | "hostgroup_20_backends_SHUNNED": 0, |
| 400 | "hostgroup_21_backends_OFFLINE_HARD": 1, |
| 401 | "hostgroup_21_backends_OFFLINE_SOFT": 0, |
| 402 | "hostgroup_21_backends_ONLINE": 0, |
| 403 | "hostgroup_21_backends_SHUNNED": 0, |
| 404 | "hostgroup_31_backends_OFFLINE_HARD": 0, |
| 405 | "hostgroup_31_backends_OFFLINE_SOFT": 1, |
| 406 | "hostgroup_31_backends_ONLINE": 0, |
| 407 | "hostgroup_31_backends_SHUNNED": 1, |
| 408 | "hostgroup_locked_queries": 0, |
| 409 | "hostgroup_locked_set_cmds": 0, |
| 410 | "jemalloc_active": 385101824, |
| 411 | "jemalloc_allocated": 379402432, |
| 412 | "jemalloc_mapped": 430993408, |
| 413 | "jemalloc_metadata": 17418872, |
| 414 | "jemalloc_resident": 403759104, |
| 415 | "jemalloc_retained": 260542464, |
| 416 | "max_connect_timeouts": 227, |
| 417 | "mysql_backend_buffers_bytes": 0, |
| 418 | "mysql_command_ALTER_TABLE_Total_Time_us": 0, |
| 419 | "mysql_command_ALTER_TABLE_Total_cnt": 0, |
| 420 | "mysql_command_ALTER_TABLE_cnt_100ms": 0, |
| 421 | "mysql_command_ALTER_TABLE_cnt_100us": 0, |
| 422 | "mysql_command_ALTER_TABLE_cnt_10ms": 0, |
| 423 | "mysql_command_ALTER_TABLE_cnt_10s": 0, |
| 424 | "mysql_command_ALTER_TABLE_cnt_1ms": 0, |
| 425 | "mysql_command_ALTER_TABLE_cnt_1s": 0, |
| 426 | "mysql_command_ALTER_TABLE_cnt_500ms": 0, |
| 427 | "mysql_command_ALTER_TABLE_cnt_500us": 0, |
| 428 | "mysql_command_ALTER_TABLE_cnt_50ms": 0, |
| 429 | "mysql_command_ALTER_TABLE_cnt_5ms": 0, |
| 430 | "mysql_command_ALTER_TABLE_cnt_5s": 0, |
| 431 | "mysql_command_ALTER_TABLE_cnt_INFs": 0, |
| 432 | "mysql_command_ALTER_VIEW_Total_Time_us": 0, |
| 433 | "mysql_command_ALTER_VIEW_Total_cnt": 0, |
| 434 | "mysql_command_ALTER_VIEW_cnt_100ms": 0, |
| 435 | "mysql_command_ALTER_VIEW_cnt_100us": 0, |
| 436 | "mysql_command_ALTER_VIEW_cnt_10ms": 0, |
| 437 | "mysql_command_ALTER_VIEW_cnt_10s": 0, |
| 438 | "mysql_command_ALTER_VIEW_cnt_1ms": 0, |
| 439 | "mysql_command_ALTER_VIEW_cnt_1s": 0, |
| 440 | "mysql_command_ALTER_VIEW_cnt_500ms": 0, |
| 441 | "mysql_command_ALTER_VIEW_cnt_500us": 0, |
| 442 | "mysql_command_ALTER_VIEW_cnt_50ms": 0, |
| 443 | "mysql_command_ALTER_VIEW_cnt_5ms": 0, |
| 444 | "mysql_command_ALTER_VIEW_cnt_5s": 0, |
| 445 | "mysql_command_ALTER_VIEW_cnt_INFs": 0, |
| 446 | "mysql_command_ANALYZE_TABLE_Total_Time_us": 0, |
| 447 | "mysql_command_ANALYZE_TABLE_Total_cnt": 0, |
| 448 | "mysql_command_ANALYZE_TABLE_cnt_100ms": 0, |
| 449 | "mysql_command_ANALYZE_TABLE_cnt_100us": 0, |
| 450 | "mysql_command_ANALYZE_TABLE_cnt_10ms": 0, |
| 451 | "mysql_command_ANALYZE_TABLE_cnt_10s": 0, |
| 452 | "mysql_command_ANALYZE_TABLE_cnt_1ms": 0, |
| 453 | "mysql_command_ANALYZE_TABLE_cnt_1s": 0, |
| 454 | "mysql_command_ANALYZE_TABLE_cnt_500ms": 0, |
| 455 | "mysql_command_ANALYZE_TABLE_cnt_500us": 0, |
| 456 | "mysql_command_ANALYZE_TABLE_cnt_50ms": 0, |
| 457 | "mysql_command_ANALYZE_TABLE_cnt_5ms": 0, |
| 458 | "mysql_command_ANALYZE_TABLE_cnt_5s": 0, |
| 459 | "mysql_command_ANALYZE_TABLE_cnt_INFs": 0, |
| 460 | "mysql_command_BEGIN_Total_Time_us": 0, |
| 461 | "mysql_command_BEGIN_Total_cnt": 0, |
| 462 | "mysql_command_BEGIN_cnt_100ms": 0, |
| 463 | "mysql_command_BEGIN_cnt_100us": 0, |
| 464 | "mysql_command_BEGIN_cnt_10ms": 0, |
| 465 | "mysql_command_BEGIN_cnt_10s": 0, |
| 466 | "mysql_command_BEGIN_cnt_1ms": 0, |
| 467 | "mysql_command_BEGIN_cnt_1s": 0, |
| 468 | "mysql_command_BEGIN_cnt_500ms": 0, |
| 469 | "mysql_command_BEGIN_cnt_500us": 0, |
| 470 | "mysql_command_BEGIN_cnt_50ms": 0, |
| 471 | "mysql_command_BEGIN_cnt_5ms": 0, |
| 472 | "mysql_command_BEGIN_cnt_5s": 0, |
| 473 | "mysql_command_BEGIN_cnt_INFs": 0, |
| 474 | "mysql_command_CALL_Total_Time_us": 0, |
| 475 | "mysql_command_CALL_Total_cnt": 0, |
| 476 | "mysql_command_CALL_cnt_100ms": 0, |
| 477 | "mysql_command_CALL_cnt_100us": 0, |
| 478 | "mysql_command_CALL_cnt_10ms": 0, |
| 479 | "mysql_command_CALL_cnt_10s": 0, |
| 480 | "mysql_command_CALL_cnt_1ms": 0, |
| 481 | "mysql_command_CALL_cnt_1s": 0, |
| 482 | "mysql_command_CALL_cnt_500ms": 0, |
| 483 | "mysql_command_CALL_cnt_500us": 0, |
| 484 | "mysql_command_CALL_cnt_50ms": 0, |
| 485 | "mysql_command_CALL_cnt_5ms": 0, |
| 486 | "mysql_command_CALL_cnt_5s": 0, |
| 487 | "mysql_command_CALL_cnt_INFs": 0, |
| 488 | "mysql_command_CHANGE_MASTER_Total_Time_us": 0, |
| 489 | "mysql_command_CHANGE_MASTER_Total_cnt": 0, |
| 490 | "mysql_command_CHANGE_MASTER_cnt_100ms": 0, |
| 491 | "mysql_command_CHANGE_MASTER_cnt_100us": 0, |
| 492 | "mysql_command_CHANGE_MASTER_cnt_10ms": 0, |
| 493 | "mysql_command_CHANGE_MASTER_cnt_10s": 0, |
| 494 | "mysql_command_CHANGE_MASTER_cnt_1ms": 0, |
| 495 | "mysql_command_CHANGE_MASTER_cnt_1s": 0, |
| 496 | "mysql_command_CHANGE_MASTER_cnt_500ms": 0, |
| 497 | "mysql_command_CHANGE_MASTER_cnt_500us": 0, |
| 498 | "mysql_command_CHANGE_MASTER_cnt_50ms": 0, |
| 499 | "mysql_command_CHANGE_MASTER_cnt_5ms": 0, |
| 500 | "mysql_command_CHANGE_MASTER_cnt_5s": 0, |
| 501 | "mysql_command_CHANGE_MASTER_cnt_INFs": 0, |
| 502 | "mysql_command_COMMIT_Total_Time_us": 0, |
| 503 | "mysql_command_COMMIT_Total_cnt": 0, |
| 504 | "mysql_command_COMMIT_cnt_100ms": 0, |
| 505 | "mysql_command_COMMIT_cnt_100us": 0, |
| 506 | "mysql_command_COMMIT_cnt_10ms": 0, |
| 507 | "mysql_command_COMMIT_cnt_10s": 0, |
| 508 | "mysql_command_COMMIT_cnt_1ms": 0, |
| 509 | "mysql_command_COMMIT_cnt_1s": 0, |
| 510 | "mysql_command_COMMIT_cnt_500ms": 0, |
| 511 | "mysql_command_COMMIT_cnt_500us": 0, |
| 512 | "mysql_command_COMMIT_cnt_50ms": 0, |
| 513 | "mysql_command_COMMIT_cnt_5ms": 0, |
| 514 | "mysql_command_COMMIT_cnt_5s": 0, |
| 515 | "mysql_command_COMMIT_cnt_INFs": 0, |
| 516 | "mysql_command_CREATE_DATABASE_Total_Time_us": 0, |
| 517 | "mysql_command_CREATE_DATABASE_Total_cnt": 0, |
| 518 | "mysql_command_CREATE_DATABASE_cnt_100ms": 0, |
| 519 | "mysql_command_CREATE_DATABASE_cnt_100us": 0, |
| 520 | "mysql_command_CREATE_DATABASE_cnt_10ms": 0, |
| 521 | "mysql_command_CREATE_DATABASE_cnt_10s": 0, |
| 522 | "mysql_command_CREATE_DATABASE_cnt_1ms": 0, |
| 523 | "mysql_command_CREATE_DATABASE_cnt_1s": 0, |
| 524 | "mysql_command_CREATE_DATABASE_cnt_500ms": 0, |
| 525 | "mysql_command_CREATE_DATABASE_cnt_500us": 0, |
| 526 | "mysql_command_CREATE_DATABASE_cnt_50ms": 0, |
| 527 | "mysql_command_CREATE_DATABASE_cnt_5ms": 0, |
| 528 | "mysql_command_CREATE_DATABASE_cnt_5s": 0, |
| 529 | "mysql_command_CREATE_DATABASE_cnt_INFs": 0, |
| 530 | "mysql_command_CREATE_INDEX_Total_Time_us": 0, |
| 531 | "mysql_command_CREATE_INDEX_Total_cnt": 0, |
| 532 | "mysql_command_CREATE_INDEX_cnt_100ms": 0, |
| 533 | "mysql_command_CREATE_INDEX_cnt_100us": 0, |
| 534 | "mysql_command_CREATE_INDEX_cnt_10ms": 0, |
| 535 | "mysql_command_CREATE_INDEX_cnt_10s": 0, |
| 536 | "mysql_command_CREATE_INDEX_cnt_1ms": 0, |
| 537 | "mysql_command_CREATE_INDEX_cnt_1s": 0, |
| 538 | "mysql_command_CREATE_INDEX_cnt_500ms": 0, |
| 539 | "mysql_command_CREATE_INDEX_cnt_500us": 0, |
| 540 | "mysql_command_CREATE_INDEX_cnt_50ms": 0, |
| 541 | "mysql_command_CREATE_INDEX_cnt_5ms": 0, |
| 542 | "mysql_command_CREATE_INDEX_cnt_5s": 0, |
| 543 | "mysql_command_CREATE_INDEX_cnt_INFs": 0, |
| 544 | "mysql_command_CREATE_TABLE_Total_Time_us": 0, |
| 545 | "mysql_command_CREATE_TABLE_Total_cnt": 0, |
| 546 | "mysql_command_CREATE_TABLE_cnt_100ms": 0, |
| 547 | "mysql_command_CREATE_TABLE_cnt_100us": 0, |
| 548 | "mysql_command_CREATE_TABLE_cnt_10ms": 0, |
| 549 | "mysql_command_CREATE_TABLE_cnt_10s": 0, |
| 550 | "mysql_command_CREATE_TABLE_cnt_1ms": 0, |
| 551 | "mysql_command_CREATE_TABLE_cnt_1s": 0, |
| 552 | "mysql_command_CREATE_TABLE_cnt_500ms": 0, |
| 553 | "mysql_command_CREATE_TABLE_cnt_500us": 0, |
| 554 | "mysql_command_CREATE_TABLE_cnt_50ms": 0, |
| 555 | "mysql_command_CREATE_TABLE_cnt_5ms": 0, |
| 556 | "mysql_command_CREATE_TABLE_cnt_5s": 0, |
| 557 | "mysql_command_CREATE_TABLE_cnt_INFs": 0, |
| 558 | "mysql_command_CREATE_TEMPORARY_Total_Time_us": 0, |
| 559 | "mysql_command_CREATE_TEMPORARY_Total_cnt": 0, |
| 560 | "mysql_command_CREATE_TEMPORARY_cnt_100ms": 0, |
| 561 | "mysql_command_CREATE_TEMPORARY_cnt_100us": 0, |
| 562 | "mysql_command_CREATE_TEMPORARY_cnt_10ms": 0, |
| 563 | "mysql_command_CREATE_TEMPORARY_cnt_10s": 0, |
| 564 | "mysql_command_CREATE_TEMPORARY_cnt_1ms": 0, |
| 565 | "mysql_command_CREATE_TEMPORARY_cnt_1s": 0, |
| 566 | "mysql_command_CREATE_TEMPORARY_cnt_500ms": 0, |
| 567 | "mysql_command_CREATE_TEMPORARY_cnt_500us": 0, |
| 568 | "mysql_command_CREATE_TEMPORARY_cnt_50ms": 0, |
| 569 | "mysql_command_CREATE_TEMPORARY_cnt_5ms": 0, |
| 570 | "mysql_command_CREATE_TEMPORARY_cnt_5s": 0, |
| 571 | "mysql_command_CREATE_TEMPORARY_cnt_INFs": 0, |
| 572 | "mysql_command_CREATE_TRIGGER_Total_Time_us": 0, |
| 573 | "mysql_command_CREATE_TRIGGER_Total_cnt": 0, |
| 574 | "mysql_command_CREATE_TRIGGER_cnt_100ms": 0, |
| 575 | "mysql_command_CREATE_TRIGGER_cnt_100us": 0, |
| 576 | "mysql_command_CREATE_TRIGGER_cnt_10ms": 0, |
| 577 | "mysql_command_CREATE_TRIGGER_cnt_10s": 0, |
| 578 | "mysql_command_CREATE_TRIGGER_cnt_1ms": 0, |
| 579 | "mysql_command_CREATE_TRIGGER_cnt_1s": 0, |
| 580 | "mysql_command_CREATE_TRIGGER_cnt_500ms": 0, |
| 581 | "mysql_command_CREATE_TRIGGER_cnt_500us": 0, |
| 582 | "mysql_command_CREATE_TRIGGER_cnt_50ms": 0, |
| 583 | "mysql_command_CREATE_TRIGGER_cnt_5ms": 0, |
| 584 | "mysql_command_CREATE_TRIGGER_cnt_5s": 0, |
| 585 | "mysql_command_CREATE_TRIGGER_cnt_INFs": 0, |
| 586 | "mysql_command_CREATE_USER_Total_Time_us": 0, |
| 587 | "mysql_command_CREATE_USER_Total_cnt": 0, |
| 588 | "mysql_command_CREATE_USER_cnt_100ms": 0, |
| 589 | "mysql_command_CREATE_USER_cnt_100us": 0, |
| 590 | "mysql_command_CREATE_USER_cnt_10ms": 0, |
| 591 | "mysql_command_CREATE_USER_cnt_10s": 0, |
| 592 | "mysql_command_CREATE_USER_cnt_1ms": 0, |
| 593 | "mysql_command_CREATE_USER_cnt_1s": 0, |
| 594 | "mysql_command_CREATE_USER_cnt_500ms": 0, |
| 595 | "mysql_command_CREATE_USER_cnt_500us": 0, |
| 596 | "mysql_command_CREATE_USER_cnt_50ms": 0, |
| 597 | "mysql_command_CREATE_USER_cnt_5ms": 0, |
| 598 | "mysql_command_CREATE_USER_cnt_5s": 0, |
| 599 | "mysql_command_CREATE_USER_cnt_INFs": 0, |
| 600 | "mysql_command_CREATE_VIEW_Total_Time_us": 0, |
| 601 | "mysql_command_CREATE_VIEW_Total_cnt": 0, |
| 602 | "mysql_command_CREATE_VIEW_cnt_100ms": 0, |
| 603 | "mysql_command_CREATE_VIEW_cnt_100us": 0, |
| 604 | "mysql_command_CREATE_VIEW_cnt_10ms": 0, |
| 605 | "mysql_command_CREATE_VIEW_cnt_10s": 0, |
| 606 | "mysql_command_CREATE_VIEW_cnt_1ms": 0, |
| 607 | "mysql_command_CREATE_VIEW_cnt_1s": 0, |
| 608 | "mysql_command_CREATE_VIEW_cnt_500ms": 0, |
| 609 | "mysql_command_CREATE_VIEW_cnt_500us": 0, |
| 610 | "mysql_command_CREATE_VIEW_cnt_50ms": 0, |
| 611 | "mysql_command_CREATE_VIEW_cnt_5ms": 0, |
| 612 | "mysql_command_CREATE_VIEW_cnt_5s": 0, |
| 613 | "mysql_command_CREATE_VIEW_cnt_INFs": 0, |
| 614 | "mysql_command_DEALLOCATE_Total_Time_us": 0, |
| 615 | "mysql_command_DEALLOCATE_Total_cnt": 0, |
| 616 | "mysql_command_DEALLOCATE_cnt_100ms": 0, |
| 617 | "mysql_command_DEALLOCATE_cnt_100us": 0, |
| 618 | "mysql_command_DEALLOCATE_cnt_10ms": 0, |
| 619 | "mysql_command_DEALLOCATE_cnt_10s": 0, |
| 620 | "mysql_command_DEALLOCATE_cnt_1ms": 0, |
| 621 | "mysql_command_DEALLOCATE_cnt_1s": 0, |
| 622 | "mysql_command_DEALLOCATE_cnt_500ms": 0, |
| 623 | "mysql_command_DEALLOCATE_cnt_500us": 0, |
| 624 | "mysql_command_DEALLOCATE_cnt_50ms": 0, |
| 625 | "mysql_command_DEALLOCATE_cnt_5ms": 0, |
| 626 | "mysql_command_DEALLOCATE_cnt_5s": 0, |
| 627 | "mysql_command_DEALLOCATE_cnt_INFs": 0, |
| 628 | "mysql_command_DELETE_Total_Time_us": 0, |
| 629 | "mysql_command_DELETE_Total_cnt": 0, |
| 630 | "mysql_command_DELETE_cnt_100ms": 0, |
| 631 | "mysql_command_DELETE_cnt_100us": 0, |
| 632 | "mysql_command_DELETE_cnt_10ms": 0, |
| 633 | "mysql_command_DELETE_cnt_10s": 0, |
| 634 | "mysql_command_DELETE_cnt_1ms": 0, |
| 635 | "mysql_command_DELETE_cnt_1s": 0, |
| 636 | "mysql_command_DELETE_cnt_500ms": 0, |
| 637 | "mysql_command_DELETE_cnt_500us": 0, |
| 638 | "mysql_command_DELETE_cnt_50ms": 0, |
| 639 | "mysql_command_DELETE_cnt_5ms": 0, |
| 640 | "mysql_command_DELETE_cnt_5s": 0, |
| 641 | "mysql_command_DELETE_cnt_INFs": 0, |
| 642 | "mysql_command_DESCRIBE_Total_Time_us": 0, |
| 643 | "mysql_command_DESCRIBE_Total_cnt": 0, |
| 644 | "mysql_command_DESCRIBE_cnt_100ms": 0, |
| 645 | "mysql_command_DESCRIBE_cnt_100us": 0, |
| 646 | "mysql_command_DESCRIBE_cnt_10ms": 0, |
| 647 | "mysql_command_DESCRIBE_cnt_10s": 0, |
| 648 | "mysql_command_DESCRIBE_cnt_1ms": 0, |
| 649 | "mysql_command_DESCRIBE_cnt_1s": 0, |
| 650 | "mysql_command_DESCRIBE_cnt_500ms": 0, |
| 651 | "mysql_command_DESCRIBE_cnt_500us": 0, |
| 652 | "mysql_command_DESCRIBE_cnt_50ms": 0, |
| 653 | "mysql_command_DESCRIBE_cnt_5ms": 0, |
| 654 | "mysql_command_DESCRIBE_cnt_5s": 0, |
| 655 | "mysql_command_DESCRIBE_cnt_INFs": 0, |
| 656 | "mysql_command_DROP_DATABASE_Total_Time_us": 0, |
| 657 | "mysql_command_DROP_DATABASE_Total_cnt": 0, |
| 658 | "mysql_command_DROP_DATABASE_cnt_100ms": 0, |
| 659 | "mysql_command_DROP_DATABASE_cnt_100us": 0, |
| 660 | "mysql_command_DROP_DATABASE_cnt_10ms": 0, |
| 661 | "mysql_command_DROP_DATABASE_cnt_10s": 0, |
| 662 | "mysql_command_DROP_DATABASE_cnt_1ms": 0, |
| 663 | "mysql_command_DROP_DATABASE_cnt_1s": 0, |
| 664 | "mysql_command_DROP_DATABASE_cnt_500ms": 0, |
| 665 | "mysql_command_DROP_DATABASE_cnt_500us": 0, |
| 666 | "mysql_command_DROP_DATABASE_cnt_50ms": 0, |
| 667 | "mysql_command_DROP_DATABASE_cnt_5ms": 0, |
| 668 | "mysql_command_DROP_DATABASE_cnt_5s": 0, |
| 669 | "mysql_command_DROP_DATABASE_cnt_INFs": 0, |
| 670 | "mysql_command_DROP_INDEX_Total_Time_us": 0, |
| 671 | "mysql_command_DROP_INDEX_Total_cnt": 0, |
| 672 | "mysql_command_DROP_INDEX_cnt_100ms": 0, |
| 673 | "mysql_command_DROP_INDEX_cnt_100us": 0, |
| 674 | "mysql_command_DROP_INDEX_cnt_10ms": 0, |
| 675 | "mysql_command_DROP_INDEX_cnt_10s": 0, |
| 676 | "mysql_command_DROP_INDEX_cnt_1ms": 0, |
| 677 | "mysql_command_DROP_INDEX_cnt_1s": 0, |
| 678 | "mysql_command_DROP_INDEX_cnt_500ms": 0, |
| 679 | "mysql_command_DROP_INDEX_cnt_500us": 0, |
| 680 | "mysql_command_DROP_INDEX_cnt_50ms": 0, |
| 681 | "mysql_command_DROP_INDEX_cnt_5ms": 0, |
| 682 | "mysql_command_DROP_INDEX_cnt_5s": 0, |
| 683 | "mysql_command_DROP_INDEX_cnt_INFs": 0, |
| 684 | "mysql_command_DROP_TABLE_Total_Time_us": 0, |
| 685 | "mysql_command_DROP_TABLE_Total_cnt": 0, |
| 686 | "mysql_command_DROP_TABLE_cnt_100ms": 0, |
| 687 | "mysql_command_DROP_TABLE_cnt_100us": 0, |
| 688 | "mysql_command_DROP_TABLE_cnt_10ms": 0, |
| 689 | "mysql_command_DROP_TABLE_cnt_10s": 0, |
| 690 | "mysql_command_DROP_TABLE_cnt_1ms": 0, |
| 691 | "mysql_command_DROP_TABLE_cnt_1s": 0, |
| 692 | "mysql_command_DROP_TABLE_cnt_500ms": 0, |
| 693 | "mysql_command_DROP_TABLE_cnt_500us": 0, |
| 694 | "mysql_command_DROP_TABLE_cnt_50ms": 0, |
| 695 | "mysql_command_DROP_TABLE_cnt_5ms": 0, |
| 696 | "mysql_command_DROP_TABLE_cnt_5s": 0, |
| 697 | "mysql_command_DROP_TABLE_cnt_INFs": 0, |
| 698 | "mysql_command_DROP_TRIGGER_Total_Time_us": 0, |
| 699 | "mysql_command_DROP_TRIGGER_Total_cnt": 0, |
| 700 | "mysql_command_DROP_TRIGGER_cnt_100ms": 0, |
| 701 | "mysql_command_DROP_TRIGGER_cnt_100us": 0, |
| 702 | "mysql_command_DROP_TRIGGER_cnt_10ms": 0, |
| 703 | "mysql_command_DROP_TRIGGER_cnt_10s": 0, |
| 704 | "mysql_command_DROP_TRIGGER_cnt_1ms": 0, |
| 705 | "mysql_command_DROP_TRIGGER_cnt_1s": 0, |
| 706 | "mysql_command_DROP_TRIGGER_cnt_500ms": 0, |
| 707 | "mysql_command_DROP_TRIGGER_cnt_500us": 0, |
| 708 | "mysql_command_DROP_TRIGGER_cnt_50ms": 0, |
| 709 | "mysql_command_DROP_TRIGGER_cnt_5ms": 0, |
| 710 | "mysql_command_DROP_TRIGGER_cnt_5s": 0, |
| 711 | "mysql_command_DROP_TRIGGER_cnt_INFs": 0, |
| 712 | "mysql_command_DROP_USER_Total_Time_us": 0, |
| 713 | "mysql_command_DROP_USER_Total_cnt": 0, |
| 714 | "mysql_command_DROP_USER_cnt_100ms": 0, |
| 715 | "mysql_command_DROP_USER_cnt_100us": 0, |
| 716 | "mysql_command_DROP_USER_cnt_10ms": 0, |
| 717 | "mysql_command_DROP_USER_cnt_10s": 0, |
| 718 | "mysql_command_DROP_USER_cnt_1ms": 0, |
| 719 | "mysql_command_DROP_USER_cnt_1s": 0, |
| 720 | "mysql_command_DROP_USER_cnt_500ms": 0, |
| 721 | "mysql_command_DROP_USER_cnt_500us": 0, |
| 722 | "mysql_command_DROP_USER_cnt_50ms": 0, |
| 723 | "mysql_command_DROP_USER_cnt_5ms": 0, |
| 724 | "mysql_command_DROP_USER_cnt_5s": 0, |
| 725 | "mysql_command_DROP_USER_cnt_INFs": 0, |
| 726 | "mysql_command_DROP_VIEW_Total_Time_us": 0, |
| 727 | "mysql_command_DROP_VIEW_Total_cnt": 0, |
| 728 | "mysql_command_DROP_VIEW_cnt_100ms": 0, |
| 729 | "mysql_command_DROP_VIEW_cnt_100us": 0, |
| 730 | "mysql_command_DROP_VIEW_cnt_10ms": 0, |
| 731 | "mysql_command_DROP_VIEW_cnt_10s": 0, |
| 732 | "mysql_command_DROP_VIEW_cnt_1ms": 0, |
| 733 | "mysql_command_DROP_VIEW_cnt_1s": 0, |
| 734 | "mysql_command_DROP_VIEW_cnt_500ms": 0, |
| 735 | "mysql_command_DROP_VIEW_cnt_500us": 0, |
| 736 | "mysql_command_DROP_VIEW_cnt_50ms": 0, |
| 737 | "mysql_command_DROP_VIEW_cnt_5ms": 0, |
| 738 | "mysql_command_DROP_VIEW_cnt_5s": 0, |
| 739 | "mysql_command_DROP_VIEW_cnt_INFs": 0, |
| 740 | "mysql_command_EXECUTE_Total_Time_us": 0, |
| 741 | "mysql_command_EXECUTE_Total_cnt": 0, |
| 742 | "mysql_command_EXECUTE_cnt_100ms": 0, |
| 743 | "mysql_command_EXECUTE_cnt_100us": 0, |
| 744 | "mysql_command_EXECUTE_cnt_10ms": 0, |
| 745 | "mysql_command_EXECUTE_cnt_10s": 0, |
| 746 | "mysql_command_EXECUTE_cnt_1ms": 0, |
| 747 | "mysql_command_EXECUTE_cnt_1s": 0, |
| 748 | "mysql_command_EXECUTE_cnt_500ms": 0, |
| 749 | "mysql_command_EXECUTE_cnt_500us": 0, |
| 750 | "mysql_command_EXECUTE_cnt_50ms": 0, |
| 751 | "mysql_command_EXECUTE_cnt_5ms": 0, |
| 752 | "mysql_command_EXECUTE_cnt_5s": 0, |
| 753 | "mysql_command_EXECUTE_cnt_INFs": 0, |
| 754 | "mysql_command_EXPLAIN_Total_Time_us": 0, |
| 755 | "mysql_command_EXPLAIN_Total_cnt": 0, |
| 756 | "mysql_command_EXPLAIN_cnt_100ms": 0, |
| 757 | "mysql_command_EXPLAIN_cnt_100us": 0, |
| 758 | "mysql_command_EXPLAIN_cnt_10ms": 0, |
| 759 | "mysql_command_EXPLAIN_cnt_10s": 0, |
| 760 | "mysql_command_EXPLAIN_cnt_1ms": 0, |
| 761 | "mysql_command_EXPLAIN_cnt_1s": 0, |
| 762 | "mysql_command_EXPLAIN_cnt_500ms": 0, |
| 763 | "mysql_command_EXPLAIN_cnt_500us": 0, |
| 764 | "mysql_command_EXPLAIN_cnt_50ms": 0, |
| 765 | "mysql_command_EXPLAIN_cnt_5ms": 0, |
| 766 | "mysql_command_EXPLAIN_cnt_5s": 0, |
| 767 | "mysql_command_EXPLAIN_cnt_INFs": 0, |
| 768 | "mysql_command_FLUSH_Total_Time_us": 0, |
| 769 | "mysql_command_FLUSH_Total_cnt": 0, |
| 770 | "mysql_command_FLUSH_cnt_100ms": 0, |
| 771 | "mysql_command_FLUSH_cnt_100us": 0, |
| 772 | "mysql_command_FLUSH_cnt_10ms": 0, |
| 773 | "mysql_command_FLUSH_cnt_10s": 0, |
| 774 | "mysql_command_FLUSH_cnt_1ms": 0, |
| 775 | "mysql_command_FLUSH_cnt_1s": 0, |
| 776 | "mysql_command_FLUSH_cnt_500ms": 0, |
| 777 | "mysql_command_FLUSH_cnt_500us": 0, |
| 778 | "mysql_command_FLUSH_cnt_50ms": 0, |
| 779 | "mysql_command_FLUSH_cnt_5ms": 0, |
| 780 | "mysql_command_FLUSH_cnt_5s": 0, |
| 781 | "mysql_command_FLUSH_cnt_INFs": 0, |
| 782 | "mysql_command_GRANT_Total_Time_us": 0, |
| 783 | "mysql_command_GRANT_Total_cnt": 0, |
| 784 | "mysql_command_GRANT_cnt_100ms": 0, |
| 785 | "mysql_command_GRANT_cnt_100us": 0, |
| 786 | "mysql_command_GRANT_cnt_10ms": 0, |
| 787 | "mysql_command_GRANT_cnt_10s": 0, |
| 788 | "mysql_command_GRANT_cnt_1ms": 0, |
| 789 | "mysql_command_GRANT_cnt_1s": 0, |
| 790 | "mysql_command_GRANT_cnt_500ms": 0, |
| 791 | "mysql_command_GRANT_cnt_500us": 0, |
| 792 | "mysql_command_GRANT_cnt_50ms": 0, |
| 793 | "mysql_command_GRANT_cnt_5ms": 0, |
| 794 | "mysql_command_GRANT_cnt_5s": 0, |
| 795 | "mysql_command_GRANT_cnt_INFs": 0, |
| 796 | "mysql_command_INSERT_Total_Time_us": 0, |
| 797 | "mysql_command_INSERT_Total_cnt": 0, |
| 798 | "mysql_command_INSERT_cnt_100ms": 0, |
| 799 | "mysql_command_INSERT_cnt_100us": 0, |
| 800 | "mysql_command_INSERT_cnt_10ms": 0, |
| 801 | "mysql_command_INSERT_cnt_10s": 0, |
| 802 | "mysql_command_INSERT_cnt_1ms": 0, |
| 803 | "mysql_command_INSERT_cnt_1s": 0, |
| 804 | "mysql_command_INSERT_cnt_500ms": 0, |
| 805 | "mysql_command_INSERT_cnt_500us": 0, |
| 806 | "mysql_command_INSERT_cnt_50ms": 0, |
| 807 | "mysql_command_INSERT_cnt_5ms": 0, |
| 808 | "mysql_command_INSERT_cnt_5s": 0, |
| 809 | "mysql_command_INSERT_cnt_INFs": 0, |
| 810 | "mysql_command_KILL_Total_Time_us": 0, |
| 811 | "mysql_command_KILL_Total_cnt": 0, |
| 812 | "mysql_command_KILL_cnt_100ms": 0, |
| 813 | "mysql_command_KILL_cnt_100us": 0, |
| 814 | "mysql_command_KILL_cnt_10ms": 0, |
| 815 | "mysql_command_KILL_cnt_10s": 0, |
| 816 | "mysql_command_KILL_cnt_1ms": 0, |
| 817 | "mysql_command_KILL_cnt_1s": 0, |
| 818 | "mysql_command_KILL_cnt_500ms": 0, |
| 819 | "mysql_command_KILL_cnt_500us": 0, |
| 820 | "mysql_command_KILL_cnt_50ms": 0, |
| 821 | "mysql_command_KILL_cnt_5ms": 0, |
| 822 | "mysql_command_KILL_cnt_5s": 0, |
| 823 | "mysql_command_KILL_cnt_INFs": 0, |
| 824 | "mysql_command_LOAD_Total_Time_us": 0, |
| 825 | "mysql_command_LOAD_Total_cnt": 0, |
| 826 | "mysql_command_LOAD_cnt_100ms": 0, |
| 827 | "mysql_command_LOAD_cnt_100us": 0, |
| 828 | "mysql_command_LOAD_cnt_10ms": 0, |
| 829 | "mysql_command_LOAD_cnt_10s": 0, |
| 830 | "mysql_command_LOAD_cnt_1ms": 0, |
| 831 | "mysql_command_LOAD_cnt_1s": 0, |
| 832 | "mysql_command_LOAD_cnt_500ms": 0, |
| 833 | "mysql_command_LOAD_cnt_500us": 0, |
| 834 | "mysql_command_LOAD_cnt_50ms": 0, |
| 835 | "mysql_command_LOAD_cnt_5ms": 0, |
| 836 | "mysql_command_LOAD_cnt_5s": 0, |
| 837 | "mysql_command_LOAD_cnt_INFs": 0, |
| 838 | "mysql_command_LOCK_TABLE_Total_Time_us": 0, |
| 839 | "mysql_command_LOCK_TABLE_Total_cnt": 0, |
| 840 | "mysql_command_LOCK_TABLE_cnt_100ms": 0, |
| 841 | "mysql_command_LOCK_TABLE_cnt_100us": 0, |
| 842 | "mysql_command_LOCK_TABLE_cnt_10ms": 0, |
| 843 | "mysql_command_LOCK_TABLE_cnt_10s": 0, |
| 844 | "mysql_command_LOCK_TABLE_cnt_1ms": 0, |
| 845 | "mysql_command_LOCK_TABLE_cnt_1s": 0, |
| 846 | "mysql_command_LOCK_TABLE_cnt_500ms": 0, |
| 847 | "mysql_command_LOCK_TABLE_cnt_500us": 0, |
| 848 | "mysql_command_LOCK_TABLE_cnt_50ms": 0, |
| 849 | "mysql_command_LOCK_TABLE_cnt_5ms": 0, |
| 850 | "mysql_command_LOCK_TABLE_cnt_5s": 0, |
| 851 | "mysql_command_LOCK_TABLE_cnt_INFs": 0, |
| 852 | "mysql_command_OPTIMIZE_Total_Time_us": 0, |
| 853 | "mysql_command_OPTIMIZE_Total_cnt": 0, |
| 854 | "mysql_command_OPTIMIZE_cnt_100ms": 0, |
| 855 | "mysql_command_OPTIMIZE_cnt_100us": 0, |
| 856 | "mysql_command_OPTIMIZE_cnt_10ms": 0, |
| 857 | "mysql_command_OPTIMIZE_cnt_10s": 0, |
| 858 | "mysql_command_OPTIMIZE_cnt_1ms": 0, |
| 859 | "mysql_command_OPTIMIZE_cnt_1s": 0, |
| 860 | "mysql_command_OPTIMIZE_cnt_500ms": 0, |
| 861 | "mysql_command_OPTIMIZE_cnt_500us": 0, |
| 862 | "mysql_command_OPTIMIZE_cnt_50ms": 0, |
| 863 | "mysql_command_OPTIMIZE_cnt_5ms": 0, |
| 864 | "mysql_command_OPTIMIZE_cnt_5s": 0, |
| 865 | "mysql_command_OPTIMIZE_cnt_INFs": 0, |
| 866 | "mysql_command_PREPARE_Total_Time_us": 0, |
| 867 | "mysql_command_PREPARE_Total_cnt": 0, |
| 868 | "mysql_command_PREPARE_cnt_100ms": 0, |
| 869 | "mysql_command_PREPARE_cnt_100us": 0, |
| 870 | "mysql_command_PREPARE_cnt_10ms": 0, |
| 871 | "mysql_command_PREPARE_cnt_10s": 0, |
| 872 | "mysql_command_PREPARE_cnt_1ms": 0, |
| 873 | "mysql_command_PREPARE_cnt_1s": 0, |
| 874 | "mysql_command_PREPARE_cnt_500ms": 0, |
| 875 | "mysql_command_PREPARE_cnt_500us": 0, |
| 876 | "mysql_command_PREPARE_cnt_50ms": 0, |
| 877 | "mysql_command_PREPARE_cnt_5ms": 0, |
| 878 | "mysql_command_PREPARE_cnt_5s": 0, |
| 879 | "mysql_command_PREPARE_cnt_INFs": 0, |
| 880 | "mysql_command_PURGE_Total_Time_us": 0, |
| 881 | "mysql_command_PURGE_Total_cnt": 0, |
| 882 | "mysql_command_PURGE_cnt_100ms": 0, |
| 883 | "mysql_command_PURGE_cnt_100us": 0, |
| 884 | "mysql_command_PURGE_cnt_10ms": 0, |
| 885 | "mysql_command_PURGE_cnt_10s": 0, |
| 886 | "mysql_command_PURGE_cnt_1ms": 0, |
| 887 | "mysql_command_PURGE_cnt_1s": 0, |
| 888 | "mysql_command_PURGE_cnt_500ms": 0, |
| 889 | "mysql_command_PURGE_cnt_500us": 0, |
| 890 | "mysql_command_PURGE_cnt_50ms": 0, |
| 891 | "mysql_command_PURGE_cnt_5ms": 0, |
| 892 | "mysql_command_PURGE_cnt_5s": 0, |
| 893 | "mysql_command_PURGE_cnt_INFs": 0, |
| 894 | "mysql_command_RENAME_TABLE_Total_Time_us": 0, |
| 895 | "mysql_command_RENAME_TABLE_Total_cnt": 0, |
| 896 | "mysql_command_RENAME_TABLE_cnt_100ms": 0, |
| 897 | "mysql_command_RENAME_TABLE_cnt_100us": 0, |
| 898 | "mysql_command_RENAME_TABLE_cnt_10ms": 0, |
| 899 | "mysql_command_RENAME_TABLE_cnt_10s": 0, |
| 900 | "mysql_command_RENAME_TABLE_cnt_1ms": 0, |
| 901 | "mysql_command_RENAME_TABLE_cnt_1s": 0, |
| 902 | "mysql_command_RENAME_TABLE_cnt_500ms": 0, |
| 903 | "mysql_command_RENAME_TABLE_cnt_500us": 0, |
| 904 | "mysql_command_RENAME_TABLE_cnt_50ms": 0, |
| 905 | "mysql_command_RENAME_TABLE_cnt_5ms": 0, |
| 906 | "mysql_command_RENAME_TABLE_cnt_5s": 0, |
| 907 | "mysql_command_RENAME_TABLE_cnt_INFs": 0, |
| 908 | "mysql_command_REPLACE_Total_Time_us": 0, |
| 909 | "mysql_command_REPLACE_Total_cnt": 0, |
| 910 | "mysql_command_REPLACE_cnt_100ms": 0, |
| 911 | "mysql_command_REPLACE_cnt_100us": 0, |
| 912 | "mysql_command_REPLACE_cnt_10ms": 0, |
| 913 | "mysql_command_REPLACE_cnt_10s": 0, |
| 914 | "mysql_command_REPLACE_cnt_1ms": 0, |
| 915 | "mysql_command_REPLACE_cnt_1s": 0, |
| 916 | "mysql_command_REPLACE_cnt_500ms": 0, |
| 917 | "mysql_command_REPLACE_cnt_500us": 0, |
| 918 | "mysql_command_REPLACE_cnt_50ms": 0, |
| 919 | "mysql_command_REPLACE_cnt_5ms": 0, |
| 920 | "mysql_command_REPLACE_cnt_5s": 0, |
| 921 | "mysql_command_REPLACE_cnt_INFs": 0, |
| 922 | "mysql_command_RESET_MASTER_Total_Time_us": 0, |
| 923 | "mysql_command_RESET_MASTER_Total_cnt": 0, |
| 924 | "mysql_command_RESET_MASTER_cnt_100ms": 0, |
| 925 | "mysql_command_RESET_MASTER_cnt_100us": 0, |
| 926 | "mysql_command_RESET_MASTER_cnt_10ms": 0, |
| 927 | "mysql_command_RESET_MASTER_cnt_10s": 0, |
| 928 | "mysql_command_RESET_MASTER_cnt_1ms": 0, |
| 929 | "mysql_command_RESET_MASTER_cnt_1s": 0, |
| 930 | "mysql_command_RESET_MASTER_cnt_500ms": 0, |
| 931 | "mysql_command_RESET_MASTER_cnt_500us": 0, |
| 932 | "mysql_command_RESET_MASTER_cnt_50ms": 0, |
| 933 | "mysql_command_RESET_MASTER_cnt_5ms": 0, |
| 934 | "mysql_command_RESET_MASTER_cnt_5s": 0, |
| 935 | "mysql_command_RESET_MASTER_cnt_INFs": 0, |
| 936 | "mysql_command_RESET_SLAVE_Total_Time_us": 0, |
| 937 | "mysql_command_RESET_SLAVE_Total_cnt": 0, |
| 938 | "mysql_command_RESET_SLAVE_cnt_100ms": 0, |
| 939 | "mysql_command_RESET_SLAVE_cnt_100us": 0, |
| 940 | "mysql_command_RESET_SLAVE_cnt_10ms": 0, |
| 941 | "mysql_command_RESET_SLAVE_cnt_10s": 0, |
| 942 | "mysql_command_RESET_SLAVE_cnt_1ms": 0, |
| 943 | "mysql_command_RESET_SLAVE_cnt_1s": 0, |
| 944 | "mysql_command_RESET_SLAVE_cnt_500ms": 0, |
| 945 | "mysql_command_RESET_SLAVE_cnt_500us": 0, |
| 946 | "mysql_command_RESET_SLAVE_cnt_50ms": 0, |
| 947 | "mysql_command_RESET_SLAVE_cnt_5ms": 0, |
| 948 | "mysql_command_RESET_SLAVE_cnt_5s": 0, |
| 949 | "mysql_command_RESET_SLAVE_cnt_INFs": 0, |
| 950 | "mysql_command_REVOKE_Total_Time_us": 0, |
| 951 | "mysql_command_REVOKE_Total_cnt": 0, |
| 952 | "mysql_command_REVOKE_cnt_100ms": 0, |
| 953 | "mysql_command_REVOKE_cnt_100us": 0, |
| 954 | "mysql_command_REVOKE_cnt_10ms": 0, |
| 955 | "mysql_command_REVOKE_cnt_10s": 0, |
| 956 | "mysql_command_REVOKE_cnt_1ms": 0, |
| 957 | "mysql_command_REVOKE_cnt_1s": 0, |
| 958 | "mysql_command_REVOKE_cnt_500ms": 0, |
| 959 | "mysql_command_REVOKE_cnt_500us": 0, |
| 960 | "mysql_command_REVOKE_cnt_50ms": 0, |
| 961 | "mysql_command_REVOKE_cnt_5ms": 0, |
| 962 | "mysql_command_REVOKE_cnt_5s": 0, |
| 963 | "mysql_command_REVOKE_cnt_INFs": 0, |
| 964 | "mysql_command_ROLLBACK_Total_Time_us": 0, |
| 965 | "mysql_command_ROLLBACK_Total_cnt": 0, |
| 966 | "mysql_command_ROLLBACK_cnt_100ms": 0, |
| 967 | "mysql_command_ROLLBACK_cnt_100us": 0, |
| 968 | "mysql_command_ROLLBACK_cnt_10ms": 0, |
| 969 | "mysql_command_ROLLBACK_cnt_10s": 0, |
| 970 | "mysql_command_ROLLBACK_cnt_1ms": 0, |
| 971 | "mysql_command_ROLLBACK_cnt_1s": 0, |
| 972 | "mysql_command_ROLLBACK_cnt_500ms": 0, |
| 973 | "mysql_command_ROLLBACK_cnt_500us": 0, |
| 974 | "mysql_command_ROLLBACK_cnt_50ms": 0, |
| 975 | "mysql_command_ROLLBACK_cnt_5ms": 0, |
| 976 | "mysql_command_ROLLBACK_cnt_5s": 0, |
| 977 | "mysql_command_ROLLBACK_cnt_INFs": 0, |
| 978 | "mysql_command_SAVEPOINT_Total_Time_us": 0, |
| 979 | "mysql_command_SAVEPOINT_Total_cnt": 0, |
| 980 | "mysql_command_SAVEPOINT_cnt_100ms": 0, |
| 981 | "mysql_command_SAVEPOINT_cnt_100us": 0, |
| 982 | "mysql_command_SAVEPOINT_cnt_10ms": 0, |
| 983 | "mysql_command_SAVEPOINT_cnt_10s": 0, |
| 984 | "mysql_command_SAVEPOINT_cnt_1ms": 0, |
| 985 | "mysql_command_SAVEPOINT_cnt_1s": 0, |
| 986 | "mysql_command_SAVEPOINT_cnt_500ms": 0, |
| 987 | "mysql_command_SAVEPOINT_cnt_500us": 0, |
| 988 | "mysql_command_SAVEPOINT_cnt_50ms": 0, |
| 989 | "mysql_command_SAVEPOINT_cnt_5ms": 0, |
| 990 | "mysql_command_SAVEPOINT_cnt_5s": 0, |
| 991 | "mysql_command_SAVEPOINT_cnt_INFs": 0, |
| 992 | "mysql_command_SELECT_FOR_UPDATE_Total_Time_us": 0, |
| 993 | "mysql_command_SELECT_FOR_UPDATE_Total_cnt": 0, |
| 994 | "mysql_command_SELECT_FOR_UPDATE_cnt_100ms": 0, |
| 995 | "mysql_command_SELECT_FOR_UPDATE_cnt_100us": 0, |
| 996 | "mysql_command_SELECT_FOR_UPDATE_cnt_10ms": 0, |
| 997 | "mysql_command_SELECT_FOR_UPDATE_cnt_10s": 0, |
| 998 | "mysql_command_SELECT_FOR_UPDATE_cnt_1ms": 0, |
| 999 | "mysql_command_SELECT_FOR_UPDATE_cnt_1s": 0, |
| 1000 | "mysql_command_SELECT_FOR_UPDATE_cnt_500ms": 0, |
| 1001 | "mysql_command_SELECT_FOR_UPDATE_cnt_500us": 0, |
| 1002 | "mysql_command_SELECT_FOR_UPDATE_cnt_50ms": 0, |
| 1003 | "mysql_command_SELECT_FOR_UPDATE_cnt_5ms": 0, |
| 1004 | "mysql_command_SELECT_FOR_UPDATE_cnt_5s": 0, |
| 1005 | "mysql_command_SELECT_FOR_UPDATE_cnt_INFs": 0, |
| 1006 | "mysql_command_SELECT_Total_Time_us": 4673958076637, |
| 1007 | "mysql_command_SELECT_Total_cnt": 68490650, |
| 1008 | "mysql_command_SELECT_cnt_100ms": 4909816, |
| 1009 | "mysql_command_SELECT_cnt_100us": 32185976, |
| 1010 | "mysql_command_SELECT_cnt_10ms": 2955830, |
| 1011 | "mysql_command_SELECT_cnt_10s": 497, |
| 1012 | "mysql_command_SELECT_cnt_1ms": 481335, |
| 1013 | "mysql_command_SELECT_cnt_1s": 1321917, |
| 1014 | "mysql_command_SELECT_cnt_500ms": 11123900, |
| 1015 | "mysql_command_SELECT_cnt_500us": 36650, |
| 1016 | "mysql_command_SELECT_cnt_50ms": 10468460, |
| 1017 | "mysql_command_SELECT_cnt_5ms": 4600948, |
| 1018 | "mysql_command_SELECT_cnt_5s": 403451, |
| 1019 | "mysql_command_SELECT_cnt_INFs": 1870, |
| 1020 | "mysql_command_SET_Total_Time_us": 0, |
| 1021 | "mysql_command_SET_Total_cnt": 0, |
| 1022 | "mysql_command_SET_cnt_100ms": 0, |
| 1023 | "mysql_command_SET_cnt_100us": 0, |
| 1024 | "mysql_command_SET_cnt_10ms": 0, |
| 1025 | "mysql_command_SET_cnt_10s": 0, |
| 1026 | "mysql_command_SET_cnt_1ms": 0, |
| 1027 | "mysql_command_SET_cnt_1s": 0, |
| 1028 | "mysql_command_SET_cnt_500ms": 0, |
| 1029 | "mysql_command_SET_cnt_500us": 0, |
| 1030 | "mysql_command_SET_cnt_50ms": 0, |
| 1031 | "mysql_command_SET_cnt_5ms": 0, |
| 1032 | "mysql_command_SET_cnt_5s": 0, |
| 1033 | "mysql_command_SET_cnt_INFs": 0, |
| 1034 | "mysql_command_SHOW_TABLE_STATUS_Total_Time_us": 0, |
| 1035 | "mysql_command_SHOW_TABLE_STATUS_Total_cnt": 0, |
| 1036 | "mysql_command_SHOW_TABLE_STATUS_cnt_100ms": 0, |
| 1037 | "mysql_command_SHOW_TABLE_STATUS_cnt_100us": 0, |
| 1038 | "mysql_command_SHOW_TABLE_STATUS_cnt_10ms": 0, |
| 1039 | "mysql_command_SHOW_TABLE_STATUS_cnt_10s": 0, |
| 1040 | "mysql_command_SHOW_TABLE_STATUS_cnt_1ms": 0, |
| 1041 | "mysql_command_SHOW_TABLE_STATUS_cnt_1s": 0, |
| 1042 | "mysql_command_SHOW_TABLE_STATUS_cnt_500ms": 0, |
| 1043 | "mysql_command_SHOW_TABLE_STATUS_cnt_500us": 0, |
| 1044 | "mysql_command_SHOW_TABLE_STATUS_cnt_50ms": 0, |
| 1045 | "mysql_command_SHOW_TABLE_STATUS_cnt_5ms": 0, |
| 1046 | "mysql_command_SHOW_TABLE_STATUS_cnt_5s": 0, |
| 1047 | "mysql_command_SHOW_TABLE_STATUS_cnt_INFs": 0, |
| 1048 | "mysql_command_SHOW_Total_Time_us": 2158, |
| 1049 | "mysql_command_SHOW_Total_cnt": 1, |
| 1050 | "mysql_command_SHOW_cnt_100ms": 0, |
| 1051 | "mysql_command_SHOW_cnt_100us": 0, |
| 1052 | "mysql_command_SHOW_cnt_10ms": 0, |
| 1053 | "mysql_command_SHOW_cnt_10s": 0, |
| 1054 | "mysql_command_SHOW_cnt_1ms": 0, |
| 1055 | "mysql_command_SHOW_cnt_1s": 0, |
| 1056 | "mysql_command_SHOW_cnt_500ms": 0, |
| 1057 | "mysql_command_SHOW_cnt_500us": 0, |
| 1058 | "mysql_command_SHOW_cnt_50ms": 0, |
| 1059 | "mysql_command_SHOW_cnt_5ms": 1, |
| 1060 | "mysql_command_SHOW_cnt_5s": 0, |
| 1061 | "mysql_command_SHOW_cnt_INFs": 0, |
| 1062 | "mysql_command_START_TRANSACTION_Total_Time_us": 0, |
| 1063 | "mysql_command_START_TRANSACTION_Total_cnt": 0, |
| 1064 | "mysql_command_START_TRANSACTION_cnt_100ms": 0, |
| 1065 | "mysql_command_START_TRANSACTION_cnt_100us": 0, |
| 1066 | "mysql_command_START_TRANSACTION_cnt_10ms": 0, |
| 1067 | "mysql_command_START_TRANSACTION_cnt_10s": 0, |
| 1068 | "mysql_command_START_TRANSACTION_cnt_1ms": 0, |
| 1069 | "mysql_command_START_TRANSACTION_cnt_1s": 0, |
| 1070 | "mysql_command_START_TRANSACTION_cnt_500ms": 0, |
| 1071 | "mysql_command_START_TRANSACTION_cnt_500us": 0, |
| 1072 | "mysql_command_START_TRANSACTION_cnt_50ms": 0, |
| 1073 | "mysql_command_START_TRANSACTION_cnt_5ms": 0, |
| 1074 | "mysql_command_START_TRANSACTION_cnt_5s": 0, |
| 1075 | "mysql_command_START_TRANSACTION_cnt_INFs": 0, |
| 1076 | "mysql_command_TRUNCATE_TABLE_Total_Time_us": 0, |
| 1077 | "mysql_command_TRUNCATE_TABLE_Total_cnt": 0, |
| 1078 | "mysql_command_TRUNCATE_TABLE_cnt_100ms": 0, |
| 1079 | "mysql_command_TRUNCATE_TABLE_cnt_100us": 0, |
| 1080 | "mysql_command_TRUNCATE_TABLE_cnt_10ms": 0, |
| 1081 | "mysql_command_TRUNCATE_TABLE_cnt_10s": 0, |
| 1082 | "mysql_command_TRUNCATE_TABLE_cnt_1ms": 0, |
| 1083 | "mysql_command_TRUNCATE_TABLE_cnt_1s": 0, |
| 1084 | "mysql_command_TRUNCATE_TABLE_cnt_500ms": 0, |
| 1085 | "mysql_command_TRUNCATE_TABLE_cnt_500us": 0, |
| 1086 | "mysql_command_TRUNCATE_TABLE_cnt_50ms": 0, |
| 1087 | "mysql_command_TRUNCATE_TABLE_cnt_5ms": 0, |
| 1088 | "mysql_command_TRUNCATE_TABLE_cnt_5s": 0, |
| 1089 | "mysql_command_TRUNCATE_TABLE_cnt_INFs": 0, |
| 1090 | "mysql_command_UNKNOWN_Total_Time_us": 0, |
| 1091 | "mysql_command_UNKNOWN_Total_cnt": 0, |
| 1092 | "mysql_command_UNKNOWN_cnt_100ms": 0, |
| 1093 | "mysql_command_UNKNOWN_cnt_100us": 0, |
| 1094 | "mysql_command_UNKNOWN_cnt_10ms": 0, |
| 1095 | "mysql_command_UNKNOWN_cnt_10s": 0, |
| 1096 | "mysql_command_UNKNOWN_cnt_1ms": 0, |
| 1097 | "mysql_command_UNKNOWN_cnt_1s": 0, |
| 1098 | "mysql_command_UNKNOWN_cnt_500ms": 0, |
| 1099 | "mysql_command_UNKNOWN_cnt_500us": 0, |
| 1100 | "mysql_command_UNKNOWN_cnt_50ms": 0, |
| 1101 | "mysql_command_UNKNOWN_cnt_5ms": 0, |
| 1102 | "mysql_command_UNKNOWN_cnt_5s": 0, |
| 1103 | "mysql_command_UNKNOWN_cnt_INFs": 0, |
| 1104 | "mysql_command_UNLOCK_TABLES_Total_Time_us": 0, |
| 1105 | "mysql_command_UNLOCK_TABLES_Total_cnt": 0, |
| 1106 | "mysql_command_UNLOCK_TABLES_cnt_100ms": 0, |
| 1107 | "mysql_command_UNLOCK_TABLES_cnt_100us": 0, |
| 1108 | "mysql_command_UNLOCK_TABLES_cnt_10ms": 0, |
| 1109 | "mysql_command_UNLOCK_TABLES_cnt_10s": 0, |
| 1110 | "mysql_command_UNLOCK_TABLES_cnt_1ms": 0, |
| 1111 | "mysql_command_UNLOCK_TABLES_cnt_1s": 0, |
| 1112 | "mysql_command_UNLOCK_TABLES_cnt_500ms": 0, |
| 1113 | "mysql_command_UNLOCK_TABLES_cnt_500us": 0, |
| 1114 | "mysql_command_UNLOCK_TABLES_cnt_50ms": 0, |
| 1115 | "mysql_command_UNLOCK_TABLES_cnt_5ms": 0, |
| 1116 | "mysql_command_UNLOCK_TABLES_cnt_5s": 0, |
| 1117 | "mysql_command_UNLOCK_TABLES_cnt_INFs": 0, |
| 1118 | "mysql_command_UPDATE_Total_Time_us": 0, |
| 1119 | "mysql_command_UPDATE_Total_cnt": 0, |
| 1120 | "mysql_command_UPDATE_cnt_100ms": 0, |
| 1121 | "mysql_command_UPDATE_cnt_100us": 0, |
| 1122 | "mysql_command_UPDATE_cnt_10ms": 0, |
| 1123 | "mysql_command_UPDATE_cnt_10s": 0, |
| 1124 | "mysql_command_UPDATE_cnt_1ms": 0, |
| 1125 | "mysql_command_UPDATE_cnt_1s": 0, |
| 1126 | "mysql_command_UPDATE_cnt_500ms": 0, |
| 1127 | "mysql_command_UPDATE_cnt_500us": 0, |
| 1128 | "mysql_command_UPDATE_cnt_50ms": 0, |
| 1129 | "mysql_command_UPDATE_cnt_5ms": 0, |
| 1130 | "mysql_command_UPDATE_cnt_5s": 0, |
| 1131 | "mysql_command_UPDATE_cnt_INFs": 0, |
| 1132 | "mysql_command_USE_Total_Time_us": 0, |
| 1133 | "mysql_command_USE_Total_cnt": 0, |
| 1134 | "mysql_command_USE_cnt_100ms": 0, |
| 1135 | "mysql_command_USE_cnt_100us": 0, |
| 1136 | "mysql_command_USE_cnt_10ms": 0, |
| 1137 | "mysql_command_USE_cnt_10s": 0, |
| 1138 | "mysql_command_USE_cnt_1ms": 0, |
| 1139 | "mysql_command_USE_cnt_1s": 0, |
| 1140 | "mysql_command_USE_cnt_500ms": 0, |
| 1141 | "mysql_command_USE_cnt_500us": 0, |
| 1142 | "mysql_command_USE_cnt_50ms": 0, |
| 1143 | "mysql_command_USE_cnt_5ms": 0, |
| 1144 | "mysql_command_USE_cnt_5s": 0, |
| 1145 | "mysql_command_USE_cnt_INFs": 0, |
| 1146 | "mysql_firewall_rules_config": 329, |
| 1147 | "mysql_firewall_rules_table": 0, |
| 1148 | "mysql_firewall_users_config": 0, |
| 1149 | "mysql_firewall_users_table": 0, |
| 1150 | "mysql_frontend_buffers_bytes": 196608, |
| 1151 | "mysql_killed_backend_connections": 0, |
| 1152 | "mysql_killed_backend_queries": 0, |
| 1153 | "mysql_query_rules_memory": 22825, |
| 1154 | "mysql_session_internal_bytes": 20232, |
| 1155 | "mysql_unexpected_frontend_com_quit": 0, |
| 1156 | "mysql_unexpected_frontend_packets": 0, |
| 1157 | "mysql_user_first_user_frontend_connections": 0, |
| 1158 | "mysql_user_first_user_frontend_connections_utilization": 0, |
| 1159 | "mysql_user_second_user_frontend_connections": 3, |
| 1160 | "mysql_user_second_user_frontend_connections_utilization": 20, |
| 1161 | "queries_with_max_lag_ms": 0, |
| 1162 | "queries_with_max_lag_ms__delayed": 0, |
| 1163 | "queries_with_max_lag_ms__total_wait_time_us": 0, |
| 1164 | "query_digest_memory": 13688, |
| 1165 | "stack_memory_admin_threads": 16777216, |
| 1166 | "stack_memory_cluster_threads": 0, |
| 1167 | "stack_memory_mysql_threads": 33554432, |
| 1168 | "whitelisted_sqli_fingerprint": 0, |
| 1169 | } |
| 1170 | |
| 1171 | require.Equal(t, expected, mx) |
| 1172 | collecttest.TestMetricsHasAllChartsDims(t, my.Charts(), mx) |
| 1173 | }, |
| 1174 | }, |
| 1175 | }, |
| 1176 | } |
| 1177 | |
| 1178 | for name, test := range tests { |
| 1179 | t.Run(name, func(t *testing.T) { |
| 1180 | db, mock, err := sqlmock.New( |
| 1181 | sqlmock.QueryMatcherOption(sqlmock.QueryMatcherEqual), |
| 1182 | ) |
| 1183 | require.NoError(t, err) |
| 1184 | my := New() |
| 1185 | my.db = db |
| 1186 | defer func() { _ = db.Close() }() |
| 1187 | |
| 1188 | require.NoError(t, my.Init(context.Background())) |
| 1189 | |
| 1190 | for i, step := range test { |
| 1191 | t.Run(fmt.Sprintf("step[%d]", i), func(t *testing.T) { |
| 1192 | step.prepareMock(t, mock) |
| 1193 | step.check(t, my) |
| 1194 | }) |
| 1195 | } |
| 1196 | assert.NoError(t, mock.ExpectationsWereMet()) |
| 1197 | }) |
| 1198 | } |
| 1199 | } |
| 1200 | |
| 1201 | func mustMockRows(t *testing.T, data []byte) *sqlmock.Rows { |
| 1202 | rows, err := prepareMockRows(data) |
| 1203 | require.NoError(t, err) |
| 1204 | return rows |
| 1205 | } |
| 1206 | |
| 1207 | func mockExpect(t *testing.T, mock sqlmock.Sqlmock, query string, rows []byte) { |
| 1208 | mock.ExpectQuery(query).WillReturnRows(mustMockRows(t, rows)).RowsWillBeClosed() |
| 1209 | } |
| 1210 | |
| 1211 | func mockExpectErr(mock sqlmock.Sqlmock, query string) { |
| 1212 | mock.ExpectQuery(query).WillReturnError(fmt.Errorf("mock error (%s)", query)) |
| 1213 | } |
| 1214 | |
| 1215 | func prepareMockRows(data []byte) (*sqlmock.Rows, error) { |
| 1216 | if len(data) == 0 { |
| 1217 | return sqlmock.NewRows(nil), nil |
| 1218 | } |
| 1219 | |
| 1220 | r := bytes.NewReader(data) |
| 1221 | sc := bufio.NewScanner(r) |
| 1222 | |
| 1223 | var numColumns int |
| 1224 | var rows *sqlmock.Rows |
| 1225 | |
| 1226 | for sc.Scan() { |
| 1227 | s := strings.TrimSpace(strings.Trim(sc.Text(), "|")) |
| 1228 | switch { |
| 1229 | case s == "", |
| 1230 | strings.HasPrefix(s, "+"), |
| 1231 | strings.HasPrefix(s, "ft_boolean_syntax"): |
| 1232 | continue |
| 1233 | } |
| 1234 | |
| 1235 | parts := strings.Split(s, "|") |
| 1236 | for i, v := range parts { |
| 1237 | parts[i] = strings.TrimSpace(v) |
| 1238 | } |
| 1239 | |
| 1240 | if rows == nil { |
| 1241 | numColumns = len(parts) |
| 1242 | rows = sqlmock.NewRows(parts) |
| 1243 | continue |
| 1244 | } |
| 1245 | |
| 1246 | if len(parts) != numColumns { |
| 1247 | return nil, fmt.Errorf("prepareMockRows(): columns != values (%d/%d)", numColumns, len(parts)) |
| 1248 | } |
| 1249 | |
| 1250 | values := make([]driver.Value, len(parts)) |
| 1251 | for i, v := range parts { |
| 1252 | values[i] = v |
| 1253 | } |
| 1254 | rows.AddRow(values...) |
| 1255 | } |
| 1256 | |
| 1257 | if rows == nil { |
| 1258 | return nil, errors.New("prepareMockRows(): nil rows result") |
| 1259 | } |
| 1260 | |
| 1261 | return rows, sc.Err() |
| 1262 | } |