mirror of
https://github.com/fluencelabs/redis
synced 2025-04-07 01:51:05 +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) {
|
int main(int argc, char **argv) {
|
||||||
time_t start;
|
long long start;
|
||||||
|
|
||||||
initServerConfig();
|
initServerConfig();
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
@ -1685,15 +1685,15 @@ int main(int argc, char **argv) {
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
linuxOvercommitMemoryWarning();
|
linuxOvercommitMemoryWarning();
|
||||||
#endif
|
#endif
|
||||||
start = time(NULL);
|
start = ustime();
|
||||||
if (server.ds_enabled) {
|
if (server.ds_enabled) {
|
||||||
redisLog(REDIS_NOTICE,"DB not loaded (running with disk back end)");
|
redisLog(REDIS_NOTICE,"DB not loaded (running with disk back end)");
|
||||||
} else if (server.appendonly) {
|
} else if (server.appendonly) {
|
||||||
if (loadAppendOnlyFile(server.appendfilename) == REDIS_OK)
|
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 {
|
} else {
|
||||||
if (rdbLoad(server.dbfilename) == REDIS_OK)
|
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)
|
if (server.ipfd > 0)
|
||||||
redisLog(REDIS_NOTICE,"The server is now ready to accept connections on port %d", server.port);
|
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