2024-07-22 21:03:28 -04:00
|
|
|
#include "server.h"
|
|
|
|
#include "cluster.h"
|
|
|
|
#include "script.h"
|
|
|
|
#include "cluster_legacy.h"
|
|
|
|
|
2024-07-26 19:06:16 -04:00
|
|
|
/* General use-cases. */
|
2024-07-22 21:03:28 -04:00
|
|
|
void clusterSlotStatReset(int slot);
|
|
|
|
void clusterSlotStatResetAll(void);
|
2024-07-26 19:06:16 -04:00
|
|
|
|
|
|
|
/* cpu-usec metric. */
|
2024-07-22 21:03:28 -04:00
|
|
|
void clusterSlotStatsAddCpuDuration(client *c, ustime_t duration);
|
|
|
|
void clusterSlotStatsInvalidateSlotIfApplicable(scriptRunCtx *ctx);
|
2024-07-26 19:06:16 -04:00
|
|
|
|
|
|
|
/* network-bytes-in metric. */
|
|
|
|
void clusterSlotStatsAddNetworkBytesInForUserClient(client *c);
|
|
|
|
void clusterSlotStatsSetClusterMsgLength(uint32_t len);
|
|
|
|
void clusterSlotStatsResetClusterMsgLength(void);
|
|
|
|
|
|
|
|
/* network-bytes-out metric. */
|
|
|
|
void clusterSlotStatsAddNetworkBytesOutForUserClient(client *c);
|
2024-07-29 21:50:46 -07:00
|
|
|
void clusterSlotStatsIncrNetworkBytesOutForReplication(long long len);
|
|
|
|
void clusterSlotStatsDecrNetworkBytesOutForReplication(long long len);
|
2024-07-26 19:06:16 -04:00
|
|
|
void clusterSlotStatsAddNetworkBytesOutForShardedPubSubInternalPropagation(client *c, int slot);
|