mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 16:48:27 -05:00
Fix config set slowlog-log-slower-than and condition in createLatencyReport
This commit is contained in:
parent
b3660be8f5
commit
d6ba4fd56d
@ -1122,7 +1122,7 @@ void configSetCommand(client *c) {
|
|||||||
} config_set_numerical_field(
|
} config_set_numerical_field(
|
||||||
"lua-time-limit",server.lua_time_limit,0,LONG_MAX) {
|
"lua-time-limit",server.lua_time_limit,0,LONG_MAX) {
|
||||||
} config_set_numerical_field(
|
} config_set_numerical_field(
|
||||||
"slowlog-log-slower-than",server.slowlog_log_slower_than,0,LLONG_MAX) {
|
"slowlog-log-slower-than",server.slowlog_log_slower_than,-1,LLONG_MAX) {
|
||||||
} config_set_numerical_field(
|
} config_set_numerical_field(
|
||||||
"slowlog-max-len",ll,0,LONG_MAX) {
|
"slowlog-max-len",ll,0,LONG_MAX) {
|
||||||
/* Cast to unsigned. */
|
/* Cast to unsigned. */
|
||||||
|
@ -294,7 +294,7 @@ sds createLatencyReport(void) {
|
|||||||
|
|
||||||
/* Potentially commands. */
|
/* Potentially commands. */
|
||||||
if (!strcasecmp(event,"command")) {
|
if (!strcasecmp(event,"command")) {
|
||||||
if (server.slowlog_log_slower_than == 0) {
|
if (server.slowlog_log_slower_than < 0) {
|
||||||
advise_slowlog_enabled = 1;
|
advise_slowlog_enabled = 1;
|
||||||
advices++;
|
advices++;
|
||||||
} else if (server.slowlog_log_slower_than/1000 >
|
} else if (server.slowlog_log_slower_than/1000 >
|
||||||
|
Loading…
Reference in New Issue
Block a user