diff options
author | Daniel Alvarez <dalvarez@redhat.com> | 2018-03-07 19:02:30 +0100 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-03-07 10:11:03 -0800 |
commit | be95cc00791c011daad442efc1cd7486ca58023d (patch) | |
tree | 98e8bed2a65a55518f409077b6aeb9254d74ef15 /ovsdb | |
parent | a348fd916559398b23d7ddd7d5c37664dfd02237 (diff) | |
download | openvswitch-be95cc00791c011daad442efc1cd7486ca58023d.tar.gz |
ovsdb: Fix time in log traces when compacting database
Current code is mixing wall and monotonic clocks and the traces are not
useful since the timestamps are not accurate. This patch fixes it by
using the same time reference for the log as used in the code.
Without this patch, the traces look like this:
compacting database online (1519124364.908 seconds old, 951 transactions)
Signed-off-by: Daniel Alvarez <dalvarez@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ovsdb/file.c b/ovsdb/file.c index 90c2b9d20..4b7ad52ab 100644 --- a/ovsdb/file.c +++ b/ovsdb/file.c @@ -655,7 +655,7 @@ ovsdb_file_compact(struct ovsdb_file *file) comment = xasprintf("compacting database online " "(%.3f seconds old, %u transactions)", - (time_wall_msec() - file->last_compact) / 1000.0, + (time_msec() - file->last_compact) / 1000.0, file->n_transactions); VLOG_INFO("%s: %s", file->file_name, comment); |