mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 09:11:20 +00:00
Latency monitor: basic samples collection.
This commit is contained in:
@ -51,6 +51,8 @@
|
||||
#include <lua.h>
|
||||
#include <signal.h>
|
||||
|
||||
typedef long long mstime_t; /* millisecond time type. */
|
||||
|
||||
#include "ae.h" /* Event driven programming library */
|
||||
#include "sds.h" /* Dynamic safe strings */
|
||||
#include "dict.h" /* Hash tables */
|
||||
@ -61,6 +63,7 @@
|
||||
#include "intset.h" /* Compact integer set structure */
|
||||
#include "version.h" /* Version macro */
|
||||
#include "util.h" /* Misc functions useful in many places */
|
||||
#include "latency.h" /* Latency monitor API */
|
||||
|
||||
/* Error codes */
|
||||
#define REDIS_OK 0
|
||||
@ -124,6 +127,7 @@
|
||||
#define REDIS_PEER_ID_LEN (REDIS_IP_STR_LEN+32) /* Must be enough for ip:port */
|
||||
#define REDIS_BINDADDR_MAX 16
|
||||
#define REDIS_MIN_RESERVED_FDS 32
|
||||
#define REDIS_DEFAULT_LATENCY_MONITOR_THRESHOLD 10
|
||||
|
||||
#define ACTIVE_EXPIRE_CYCLE_LOOKUPS_PER_LOOP 20 /* Loopkups per loop. */
|
||||
#define ACTIVE_EXPIRE_CYCLE_FAST_DURATION 1000 /* Microseconds */
|
||||
@ -384,8 +388,6 @@
|
||||
* Data types
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
typedef long long mstime_t; /* millisecond time type. */
|
||||
|
||||
/* A redis object, that is a type able to hold a string / list / set */
|
||||
|
||||
/* The actual Redis Object */
|
||||
@ -848,6 +850,9 @@ struct redisServer {
|
||||
int lua_timedout; /* True if we reached the time limit for script
|
||||
execution. */
|
||||
int lua_kill; /* Kill the script if true. */
|
||||
/* Latency monitor */
|
||||
long long latency_monitor_threshold;
|
||||
dict *latency_events;
|
||||
/* Assert & bug reporting */
|
||||
char *assert_failed;
|
||||
char *assert_file;
|
||||
|
Reference in New Issue
Block a user