From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH] fsck.f2fs: show elapsed time of full scan
Date: Wed, 22 May 2019 12:41:41 -0700 [thread overview]
Message-ID: <20190522194141.91216-1-jaegeuk@kernel.org> (raw)
This patch introduces the elapsed time of fsck.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fsck/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fsck/main.c b/fsck/main.c
index d844820..9aca024 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -18,6 +18,7 @@
#include "fsck.h"
#include <libgen.h>
#include <ctype.h>
+#include <time.h>
#include <getopt.h>
#include "quotaio.h"
@@ -745,6 +746,7 @@ int main(int argc, char **argv)
{
struct f2fs_sb_info *sbi;
int ret = 0;
+ clock_t start = clock();
f2fs_init_configuration();
@@ -853,7 +855,7 @@ retry:
if (ret < 0)
return ret;
- printf("\nDone.\n");
+ printf("\nDone: %lf secs\n", (clock() - start) / (double)CLOCKS_PER_SEC);
return 0;
out_err:
--
2.19.0.605.g01d371f741-goog
next reply other threads:[~2019-05-22 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-22 19:41 Jaegeuk Kim [this message]
2019-05-23 13:41 ` [PATCH] fsck.f2fs: show elapsed time of full scan Chao Yu
2019-05-23 14:08 ` Jaegeuk Kim
2019-05-23 14:16 ` Chao Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190522194141.91216-1-jaegeuk@kernel.org \
--to=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).