rocksdb/util/compaction_job_stats_impl.cc
Andres Notzli e95c59cd2f Count number of corrupt keys during compaction
Summary:
For task #7771355, we would like to log the number of corrupt keys
during a compaction. This patch implements and tests the count
as part of CompactionJobStats.

Test Plan: make && make check

Reviewers: rven, igor, yhchiang, sdong

Reviewed By: sdong

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D42921
2015-07-28 16:41:40 -07:00

45 lines
943 B
C++

// Copyright (c) 2013, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
#include "rocksdb/compaction_job_stats.h"
namespace rocksdb {
#ifndef ROCKSDB_LITE
void CompactionJobStats::Reset() {
elapsed_micros = 0;
num_input_records = 0;
num_input_files = 0;
num_input_files_at_output_level = 0;
num_output_records = 0;
num_output_files = 0;
is_manual_compaction = 0;
total_input_bytes = 0;
total_output_bytes = 0;
num_records_replaced = 0;
total_input_raw_key_bytes = 0;
total_input_raw_value_bytes = 0;
num_input_deletion_records = 0;
num_expired_deletion_records = 0;
num_corrupt_keys = 0;
}
#else
void CompactionJobStats::Reset() {}
#endif // !ROCKSDB_LITE
} // namespace rocksdb