mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Measure time of the journal creation.
This commit is contained in:
parent
27fb5d9128
commit
c502634107
@ -315,6 +315,7 @@ static void tree_destructor(void *data) {
|
||||
}
|
||||
|
||||
int csync_destroy(CSYNC *ctx) {
|
||||
time_t start, finish;
|
||||
char *lock = NULL;
|
||||
char *journal = NULL;
|
||||
int jwritten = 0;
|
||||
@ -331,8 +332,13 @@ int csync_destroy(CSYNC *ctx) {
|
||||
ctx->status = CSYNC_DONE;
|
||||
|
||||
if (ctx->status & CSYNC_DONE) {
|
||||
time(&start);
|
||||
if (csync_journal_write(ctx) == 0) {
|
||||
jwritten = 1;
|
||||
time(&finish);
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
|
||||
"Writing the journal to disk took %.2f seconds",
|
||||
difftime(finish, start));
|
||||
} else {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_ERROR, "Unable to write journal: %s",
|
||||
strerror(errno));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user