Skip to content

Commit

Permalink
Rename to last_fork_start_time
Browse files Browse the repository at this point in the history
Signed-off-by: Binbin <[email protected]>
  • Loading branch information
enjoy-binbin committed Oct 30, 2024
1 parent 89cf46e commit 119e351
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2609,7 +2609,7 @@ void resetServerStats(void) {
server.stat_fork_time = 0;
server.stat_fork_rate = 0;
server.stat_total_forks = 0;
server.stat_last_fork_time = 0;
server.stat_last_fork_start_time = 0;
server.stat_rejected_conn = 0;
server.stat_sync_full = 0;
server.stat_sync_partial_ok = 0;
Expand Down Expand Up @@ -5843,8 +5843,8 @@ sds genValkeyInfoString(dict *section_dict, int all_sections, int everything) {
"pubsub_patterns:%lu\r\n", dictSize(server.pubsub_patterns),
"pubsubshard_channels:%llu\r\n", kvstoreSize(server.pubsubshard_channels),
"latest_fork_usec:%lld\r\n", server.stat_fork_time,
"latest_fork_time:%lld\r\n", server.stat_last_fork_time,
"total_forks:%lld\r\n", server.stat_total_forks,
"last_fork_start_time:%lld\r\n", server.stat_last_fork_start_time,
"migrate_cached_sockets:%ld\r\n", dictSize(server.migrate_cached_sockets),
"slave_expires_tracked_keys:%zu\r\n", getReplicaKeyWithExpireCount(),
"active_defrag_hits:%lld\r\n", server.stat_active_defrag_hits,
Expand Down Expand Up @@ -6437,7 +6437,7 @@ int serverFork(int purpose) {
server.stat_fork_time = ustime() - start;
server.stat_fork_rate =
(double)zmalloc_used_memory() * 1000000 / server.stat_fork_time / (1024 * 1024 * 1024); /* GB per second. */
server.stat_last_fork_time = start;
server.stat_last_fork_start_time = start;
latencyAddSampleIfNeeded("fork", server.stat_fork_time / 1000);

/* The child_pid and child_type are only for mutually exclusive children.
Expand Down
2 changes: 1 addition & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -1805,10 +1805,10 @@ struct valkeyServer {
long long stat_aof_rewrites; /* number of aof file rewrites performed */
long long stat_aofrw_consecutive_failures; /* The number of consecutive failures of aofrw */
long long stat_rdb_saves; /* number of rdb saves performed */
long long stat_last_fork_time; /* Last time to start a successful fork(). */
long long stat_fork_time; /* Time needed to perform latest fork() */
double stat_fork_rate; /* Fork rate in GB/sec. */
long long stat_total_forks; /* Total count of fork. */
long long stat_last_fork_start_time; /* Last us time to start a successful fork(). */
long long stat_rejected_conn; /* Clients rejected because of maxclients */
long long stat_sync_full; /* Number of full resyncs with replicas. */
long long stat_sync_partial_ok; /* Number of accepted PSYNC requests. */
Expand Down

0 comments on commit 119e351

Please sign in to comment.