mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
RDB/AOF loading times logged with millisecond precision
This commit is contained in:
parent
1187b0a56e
commit
4d60dea853
@ -1664,7 +1664,7 @@ void usage() {
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
time_t start;
|
||||
long long start;
|
||||
|
||||
initServerConfig();
|
||||
if (argc == 2) {
|
||||
@ -1685,15 +1685,15 @@ int main(int argc, char **argv) {
|
||||
#ifdef __linux__
|
||||
linuxOvercommitMemoryWarning();
|
||||
#endif
|
||||
start = time(NULL);
|
||||
start = ustime();
|
||||
if (server.ds_enabled) {
|
||||
redisLog(REDIS_NOTICE,"DB not loaded (running with disk back end)");
|
||||
} else if (server.appendonly) {
|
||||
if (loadAppendOnlyFile(server.appendfilename) == REDIS_OK)
|
||||
redisLog(REDIS_NOTICE,"DB loaded from append only file: %ld seconds",time(NULL)-start);
|
||||
redisLog(REDIS_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
|
||||
} else {
|
||||
if (rdbLoad(server.dbfilename) == REDIS_OK)
|
||||
redisLog(REDIS_NOTICE,"DB loaded from disk: %ld seconds",time(NULL)-start);
|
||||
redisLog(REDIS_NOTICE,"DB loaded from disk: %.3f seconds",(float)(ustime()-start)/1000000);
|
||||
}
|
||||
if (server.ipfd > 0)
|
||||
redisLog(REDIS_NOTICE,"The server is now ready to accept connections on port %d", server.port);
|
||||
|
Loading…
x
Reference in New Issue
Block a user