diff --git a/src/server.c b/src/server.c index 5063e4c590..3fcdc584ea 100644 --- a/src/server.c +++ b/src/server.c @@ -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; @@ -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, @@ -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. diff --git a/src/server.h b/src/server.h index 29f36edbf9..5f35f21dcc 100644 --- a/src/server.h +++ b/src/server.h @@ -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. */