Speed up reduce_levels_test

Summary: For some reason reduce_levels is opening the databse with 65.000 levels. This makes ComputeCompactionScore() function terribly slow and the tests is also very slow (20seconds).

Test Plan: mr reduce_levels_test now takes 20ms

Reviewers: sdong, rven, kradhakrishnan, yhchiang

Reviewed By: yhchiang

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D37059
main
Igor Canadi 10 years ago
parent 00c2afcd38
commit 48b0a045da
  1. 2
      util/ldb_cmd.cc

@ -1084,7 +1084,7 @@ ReduceDBLevelsCommand::ReduceDBLevelsCommand(const vector<string>& params,
const map<string, string>& options, const vector<string>& flags) :
LDBCommand(options, flags, false,
BuildCmdLineOptions({ARG_NEW_LEVELS, ARG_PRINT_OLD_LEVELS})),
old_levels_(1 << 16),
old_levels_(1 << 7),
new_levels_(-1),
print_old_levels_(false) {

Loading…
Cancel
Save