change regression rebuild to one level

Summary:
abandon fillseqdeterministic
test locally
Closes https://github.com/facebook/rocksdb/pull/2290

Differential Revision: D5151867

Pulled By: lightmark

fbshipit-source-id: 4c8a24cc937212ffb5ceb9bfaf7288eb8726d0c1
This commit is contained in:
Aaron Gao 2017-05-30 16:33:26 -07:00 committed by Facebook Github Bot
parent 103d0692ea
commit cbc821c25b
2 changed files with 15 additions and 3 deletions

View File

@ -97,6 +97,7 @@ DEFINE_string(
"readseq,"
"readreverse,"
"compact,"
"compactall,"
"readrandom,"
"multireadrandom,"
"readseq,"
@ -2420,6 +2421,8 @@ void VerifyDBFromDB(std::string& truth_db_name) {
method = &Benchmark::WriteSeqSeekSeq;
} else if (name == "compact") {
method = &Benchmark::Compact;
} else if (name == "compactall") {
CompactAll();
} else if (name == "crc32c") {
method = &Benchmark::Crc32c;
} else if (name == "xxhash") {
@ -5049,6 +5052,15 @@ void VerifyDBFromDB(std::string& truth_db_name) {
db->CompactRange(CompactRangeOptions(), nullptr, nullptr);
}
void CompactAll() {
if (db_.db != nullptr) {
db_.db->CompactRange(CompactRangeOptions(), nullptr, nullptr);
}
for (const auto& db_with_cfh : multi_dbs_) {
db_with_cfh.db->CompactRange(CompactRangeOptions(), nullptr, nullptr);
}
}
void ResetStats() {
if (db_.db != nullptr) {
db_.db->ResetStats();

View File

@ -129,11 +129,11 @@ function main {
tmp=$DB_PATH
DB_PATH=$ORIGIN_PATH
test_remote "test -d $DB_PATH"
if [[ $? -ne 0 ]] || [[ $(run_remote 'date +%u') -eq 7 &&
$(run_remote 'echo $(( $(date +"%s") - $(stat -c "%Y" '"$DB_PATH"') ))') -gt "86400" ]]; then
if [[ $? -ne 0 ]]; then
run_remote "rm -rf $DB_PATH"
echo "Building DB..."
run_db_bench "fillseqdeterministic" $NUM_KEYS 1 0
run_db_bench "fillseq" $NUM_KEYS 1 0
run_db_bench "compactall"
fi
DB_PATH=$tmp
fi