Browse Source

small fix

main
wesley 8 months ago
parent
commit
d0c73b4899
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      include/leveldb/options.h
  2. +2
    -2
      test/test_bench_gc.cc

+ 1
- 1
include/leveldb/options.h View File

@ -118,7 +118,7 @@ struct LEVELDB_EXPORT Options {
// initially populating a large database.
size_t max_file_size = 2 * 1024 * 1024;
size_t gc_size_threshold = 128 * 1024 * 1024;
size_t gc_size_threshold = 100 * 1024 * 1024;
// Compress blocks using the specified compression algorithm. This
// parameter can be changed dynamically.

+ 2
- 2
test/test_bench_gc.cc View File

@ -11,7 +11,7 @@ using namespace leveldb;
// Number of key/values to operate in database
constexpr int num_ = 100000;
// Size of each value
constexpr int value_size_ = 1000;
constexpr int value_size_ = 2000;
// Number of read operations
constexpr int reads_ = 100000;
// Number of findkeysbyfield operations
@ -42,7 +42,7 @@ void InsertData(DB *db, std::vector &lats) {
int key_ = rand() % num_+1;
int value_ = std::rand() % (num_ + 1);
int value_size = value_range(value_seed);
std::string value(value_size, 'a');
std::string value(value_size_, 'a');
std::string key = std::to_string(key_);
FieldArray field_array = {
{"1", value},

Loading…
Cancel
Save