Skip to content

Commit

Permalink
Update src/cluster_slot_stats.c
Browse files Browse the repository at this point in the history
Signed-off-by: Madelyn Olson <madelyneolson@gmail.com>
  • Loading branch information
madolson authored Jul 22, 2024
1 parent 4fbf6d4 commit 0e9d49f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/cluster_slot_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ void clusterSlotStatResetAll(void) {
* would equate to repeating the same calculation twice.
*/
static int canAddCpuDuration(client *c) {
return server.cluster_slot_stats_enabled && // Config should be enabled.
server.cluster_enabled && // Cluster mode should be enabled.
c->slot != -1 && // Command should be slot specific.
(!server.execution_nesting || // Either;
(server.execution_nesting && // 1) Command should not be nested, or
c->realcmd->flags & CMD_BLOCKING)); // 2) If command is nested, it must be due to unblocking.
return server.cluster_slot_stats_enabled && /* Config should be enabled. */
server.cluster_enabled && /* Cluster mode should be enabled. */
c->slot != -1 && /* Command should be slot specific. */
(!server.execution_nesting || /* Either; */
(server.execution_nesting && /* 1) Command should not be nested, or */
c->realcmd->flags & CMD_BLOCKING)); /* 2) If command is nested, it must be due to unblocking. */
}

void clusterSlotStatsAddCpuDuration(client *c, ustime_t duration) {
Expand Down

0 comments on commit 0e9d49f

Please sign in to comment.