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
main
Ari Ekmekji 9 years ago
parent 31a27a3606
commit 5ba3297d0d
  1. 5
      db/compaction_job.cc

@ -542,8 +542,9 @@ Status CompactionJob::Install(const MutableCFOptions& mutable_cf_options,
UpdateCompactionJobStats(stats); UpdateCompactionJobStats(stats);
auto stream = event_logger_->LogToBuffer(log_buffer_); auto stream = event_logger_->LogToBuffer(log_buffer_);
stream << "job" << job_id_ << "event" stream << "job" << job_id_
<< "compaction_finished" << "event" << "compaction_finished"
<< "compaction_time_micros" << compaction_stats_.micros
<< "output_level" << compact_->compaction->output_level() << "output_level" << compact_->compaction->output_level()
<< "num_output_files" << compact_->NumOutputFiles() << "num_output_files" << compact_->NumOutputFiles()
<< "total_output_size" << compact_->total_bytes << "total_output_size" << compact_->total_bytes

Loading…
Cancel
Save