2012-04-21 19:20:03 +02:00
|
|
|
#define SLOWLOG_ENTRY_MAX_ARGC 32
|
|
|
|
#define SLOWLOG_ENTRY_MAX_STRING 128
|
|
|
|
|
2011-06-30 13:27:32 +02:00
|
|
|
/* This structure defines an entry inside the slow log list */
|
|
|
|
typedef struct slowlogEntry {
|
|
|
|
robj **argv;
|
|
|
|
int argc;
|
2011-06-30 17:36:15 +02:00
|
|
|
long long id; /* Unique entry identifier. */
|
2011-06-30 13:27:32 +02:00
|
|
|
long long duration; /* Time spent by the query, in nanoseconds. */
|
|
|
|
time_t time; /* Unix time at which the query was executed. */
|
|
|
|
} slowlogEntry;
|
|
|
|
|
|
|
|
/* Exported API */
|
|
|
|
void slowlogInit(void);
|
|
|
|
void slowlogPushEntryIfNeeded(robj **argv, int argc, long long duration);
|
|
|
|
|
|
|
|
/* Exported commands */
|
|
|
|
void slowlogCommand(redisClient *c);
|