|
|
@ -97,7 +97,10 @@ DEFINE_bool(histogram, false, "Print histogram of operation timings"); |
|
|
|
DEFINE_bool(destroy_db_initially, true, |
|
|
|
DEFINE_bool(destroy_db_initially, true, |
|
|
|
"Destroys the database dir before start if this is 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, |
|
|
|
DEFINE_int32(write_buffer_size, rocksdb::Options().write_buffer_size, |
|
|
|
"Number of bytes to buffer in memtable before compacting"); |
|
|
|
"Number of bytes to buffer in memtable before compacting"); |
|
|
@ -444,6 +447,7 @@ class Stats { |
|
|
|
last_op_finish_ = now; |
|
|
|
last_op_finish_ = now; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (FLAGS_progress_reports) { |
|
|
|
done_++; |
|
|
|
done_++; |
|
|
|
if (done_ >= next_report_) { |
|
|
|
if (done_ >= next_report_) { |
|
|
|
if (next_report_ < 1000) next_report_ += 100; |
|
|
|
if (next_report_ < 1000) next_report_ += 100; |
|
|
@ -456,6 +460,7 @@ class Stats { |
|
|
|
fprintf(stdout, "... finished %ld ops%30s\r", done_, ""); |
|
|
|
fprintf(stdout, "... finished %ld ops%30s\r", done_, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void AddBytesForWrites(int nwrites, size_t nbytes) { |
|
|
|
void AddBytesForWrites(int nwrites, size_t nbytes) { |
|
|
|
writes_ += nwrites; |
|
|
|
writes_ += nwrites; |
|
|
|