From 5ba3297d0d38a51849a5e3b58ce5e33d680de301 Mon Sep 17 00:00:00 2001 From: Ari Ekmekji Date: Tue, 15 Sep 2015 17:11:44 -0700 Subject: [PATCH] Add compaction time to log output Summary: Although compaction time is recorded in the statistics, it is helpful to include this value in the log output corresponding to the end of compaction. Test Plan: make all && make check Reviewers: yhchiang, sdong, igor, noetzli, MarkCallaghan Reviewed By: MarkCallaghan Subscribers: dhruba Differential Revision: https://reviews.facebook.net/D47007 --- db/compaction_job.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/db/compaction_job.cc b/db/compaction_job.cc index 2fcdd2862..691aa2f62 100644 --- a/db/compaction_job.cc +++ b/db/compaction_job.cc @@ -542,8 +542,9 @@ Status CompactionJob::Install(const MutableCFOptions& mutable_cf_options, UpdateCompactionJobStats(stats); auto stream = event_logger_->LogToBuffer(log_buffer_); - stream << "job" << job_id_ << "event" - << "compaction_finished" + stream << "job" << job_id_ + << "event" << "compaction_finished" + << "compaction_time_micros" << compaction_stats_.micros << "output_level" << compact_->compaction->output_level() << "num_output_files" << compact_->NumOutputFiles() << "total_output_size" << compact_->total_bytes