51 lines
1.6 KiB
C++
51 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) 2016 MariaDB Corporation Ab
|
|
*
|
|
* Use of this software is governed by the Business Source License included
|
|
* in the LICENSE.TXT file and at www.mariadb.com/bsl11.
|
|
*
|
|
* Change Date: 2019-07-01
|
|
*
|
|
* On the date above, in accordance with the Business Source License, use
|
|
* of this software will be governed by version 2 or later of the General
|
|
* Public License.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
/**
|
|
* @file schemarouter.hh - Common schemarouter definitions
|
|
*/
|
|
|
|
#define MXS_MODULE_NAME "schemarouter"
|
|
|
|
#include <maxscale/cdefs.h>
|
|
|
|
/**
|
|
* Configuration values
|
|
*/
|
|
typedef struct schemarouter_config_st
|
|
{
|
|
double refresh_min_interval; /**< Minimum required interval between refreshes of databases */
|
|
bool refresh_databases; /**< Are databases refreshed when they are not found in the hashtable */
|
|
bool debug; /**< Enable verbose debug messages to clients */
|
|
} schemarouter_config_t;
|
|
|
|
/**
|
|
* The statistics for this router instance
|
|
*/
|
|
typedef struct
|
|
{
|
|
int n_queries; /*< Number of queries forwarded */
|
|
int n_sescmd; /*< Number of session commands */
|
|
int longest_sescmd; /*< Longest chain of stored session commands */
|
|
int n_hist_exceeded; /*< Number of sessions that exceeded session
|
|
* command history limit */
|
|
int sessions;
|
|
double ses_longest; /*< Longest session */
|
|
double ses_shortest; /*< Shortest session */
|
|
double ses_average; /*< Average session length */
|
|
int shmap_cache_hit; /*< Shard map was found from the cache */
|
|
int shmap_cache_miss; /*< No shard map found from the cache */
|
|
} ROUTER_STATS;
|