Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4d60dea8
Commit
4d60dea8
authored
Feb 28, 2011
by
antirez
Browse files
RDB/AOF loading times logged with millisecond precision
parent
1187b0a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
4d60dea8
...
...
@@ -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
=
us
time
();
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
)(
us
time
()
-
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
)(
us
time
()
-
start
)
/
1000000
)
;
}
if
(
server
.
ipfd
>
0
)
redisLog
(
REDIS_NOTICE
,
"The server is now ready to accept connections on port %d"
,
server
.
port
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment