compaction_iteration_stats.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (c) 2016-present, Facebook, Inc. All rights reserved.
  2. // This source code is licensed under both the GPLv2 (found in the
  3. // COPYING file in the root directory) and Apache 2.0 License
  4. // (found in the LICENSE.Apache file in the root directory).
  5. #pragma once
  6. #include "rocksdb/rocksdb_namespace.h"
  7. struct CompactionIterationStats {
  8. // Compaction statistics
  9. // Doesn't include records skipped because of
  10. // CompactionFilter::Decision::kRemoveAndSkipUntil.
  11. int64_t num_record_drop_user = 0;
  12. int64_t num_record_drop_hidden = 0;
  13. int64_t num_record_drop_obsolete = 0;
  14. int64_t num_record_drop_range_del = 0;
  15. int64_t num_range_del_drop_obsolete = 0;
  16. // Deletions obsoleted before bottom level due to file gap optimization.
  17. int64_t num_optimized_del_drop_obsolete = 0;
  18. uint64_t total_filter_time = 0;
  19. // Input statistics
  20. // TODO(noetzli): The stats are incomplete. They are lacking everything
  21. // consumed by MergeHelper.
  22. uint64_t num_input_records = 0;
  23. uint64_t num_input_deletion_records = 0;
  24. uint64_t num_input_corrupt_records = 0;
  25. uint64_t total_input_raw_key_bytes = 0;
  26. uint64_t total_input_raw_value_bytes = 0;
  27. // Single-Delete diagnostics for exceptional situations
  28. uint64_t num_single_del_fallthru = 0;
  29. uint64_t num_single_del_mismatch = 0;
  30. };