summaryrefslogtreecommitdiff
path: root/src/slowlog.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2011-06-30 13:27:32 +0200
committerantirez <antirez@gmail.com>2011-06-30 13:27:32 +0200
commitdaa70b179888121b92554103817443ad0ef32cd8 (patch)
tree33c755b9e53668e71cd5b6919c120d73baebce72 /src/slowlog.h
parentef67a2fc3c24d346efb1fa73b822e6a160229166 (diff)
downloadredis-daa70b179888121b92554103817443ad0ef32cd8.tar.gz
First implementation of the slow log feature
Diffstat (limited to 'src/slowlog.h')
-rw-r--r--src/slowlog.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/slowlog.h b/src/slowlog.h
new file mode 100644
index 000000000..45a500555
--- /dev/null
+++ b/src/slowlog.h
@@ -0,0 +1,14 @@
+/* This structure defines an entry inside the slow log list */
+typedef struct slowlogEntry {
+ robj **argv;
+ int argc;
+ 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);