Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
c98e7717
Commit
c98e7717
authored
Jul 23, 2019
by
antirez
Browse files
Client side caching: show tracking slots usage in INFO.
parent
9268493e
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/server.c
View file @
c98e7717
...
...
@@ -4147,7 +4147,8 @@ sds genRedisInfoString(char *section) {
"active_defrag_hits:%lld\r\n"
"active_defrag_misses:%lld\r\n"
"active_defrag_key_hits:%lld\r\n"
"active_defrag_key_misses:%lld
\r\n
"
,
"active_defrag_key_misses:%lld\r\n"
"tracking_used_slots:%lld\r\n",
server.stat_numconnections,
server.stat_numcommands,
getInstantaneousMetric(STATS_METRIC_COMMAND),
...
...
@@ -4173,7 +4174,8 @@ sds genRedisInfoString(char *section) {
server.stat_active_defrag_hits,
server.stat_active_defrag_misses,
server.stat_active_defrag_key_hits,
server
.
stat_active_defrag_key_misses
);
server.stat_active_defrag_key_misses,
trackingGetUsedSlots());
}
/* Replication */
...
...
src/server.h
View file @
c98e7717
...
...
@@ -1642,6 +1642,7 @@ void trackingRememberKeys(client *c);
void
trackingInvalidateKey
(
robj
*
keyobj
);
void
trackingInvalidateKeysOnFlush
(
int
dbid
);
void
trackingLimitUsedSlots
(
void
);
unsigned
long
long
trackingGetUsedSlots
(
void
);
/* List data type */
void
listTypeTryConversion
(
robj
*
subject
,
robj
*
value
);
...
...
src/tracking.c
View file @
c98e7717
...
...
@@ -288,3 +288,9 @@ void trackingLimitUsedSlots(void) {
}
timeout_counter
++
;
}
/* This is just used in order to access the amount of used slots in the
* tracking table. */
unsigned
long
long
trackingGetUsedSlots
(
void
)
{
return
TrackingTableUsedSlots
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment