mirror of https://github.com/facebook/rocksdb.git
Added flag progress_reports in db_stress
This commit is contained in:
parent
69aa6ecb26
commit
159928dfa5
|
@ -85,6 +85,7 @@ def main(argv):
|
|||
--open_files=500000
|
||||
--verify_checksum=1
|
||||
--sync=0
|
||||
--progress_reports=0
|
||||
--disable_wal=0
|
||||
--disable_data_sync=1
|
||||
--target_file_size_base=2097152
|
||||
|
|
|
@ -99,6 +99,7 @@ def main(argv):
|
|||
--open_files=500000
|
||||
--verify_checksum=1
|
||||
--sync=0
|
||||
--progress_reports=0
|
||||
--disable_wal=0
|
||||
--disable_data_sync=1
|
||||
--target_file_size_base=2097152
|
||||
|
|
|
@ -97,7 +97,10 @@ DEFINE_bool(histogram, false, "Print histogram of operation timings");
|
|||
DEFINE_bool(destroy_db_initially, true,
|
||||
"Destroys the database dir before start if this is true");
|
||||
|
||||
DEFINE_bool (verbose, false, "Verbose");
|
||||
DEFINE_bool(verbose, false, "Verbose");
|
||||
|
||||
DEFINE_bool(progress_reports, true,
|
||||
"If true, db_stress will report number of finished operations");
|
||||
|
||||
DEFINE_int32(write_buffer_size, rocksdb::Options().write_buffer_size,
|
||||
"Number of bytes to buffer in memtable before compacting");
|
||||
|
@ -444,16 +447,18 @@ class Stats {
|
|||
last_op_finish_ = now;
|
||||
}
|
||||
|
||||
done_++;
|
||||
if (done_ >= next_report_) {
|
||||
if (next_report_ < 1000) next_report_ += 100;
|
||||
else if (next_report_ < 5000) next_report_ += 500;
|
||||
else if (next_report_ < 10000) next_report_ += 1000;
|
||||
else if (next_report_ < 50000) next_report_ += 5000;
|
||||
else if (next_report_ < 100000) next_report_ += 10000;
|
||||
else if (next_report_ < 500000) next_report_ += 50000;
|
||||
else next_report_ += 100000;
|
||||
fprintf(stdout, "... finished %ld ops%30s\r", done_, "");
|
||||
if (FLAGS_progress_reports) {
|
||||
done_++;
|
||||
if (done_ >= next_report_) {
|
||||
if (next_report_ < 1000) next_report_ += 100;
|
||||
else if (next_report_ < 5000) next_report_ += 500;
|
||||
else if (next_report_ < 10000) next_report_ += 1000;
|
||||
else if (next_report_ < 50000) next_report_ += 5000;
|
||||
else if (next_report_ < 100000) next_report_ += 10000;
|
||||
else if (next_report_ < 500000) next_report_ += 50000;
|
||||
else next_report_ += 100000;
|
||||
fprintf(stdout, "... finished %ld ops%30s\r", done_, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue