Commit 4d60dea8 authored by antirez's avatar antirez
Browse files

RDB/AOF loading times logged with millisecond precision

parent 1187b0a5
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment