|
|
@ -1353,6 +1353,9 @@ DBDumperCommand::DBDumperCommand( |
|
|
|
itr = options.find(ARG_PATH); |
|
|
|
itr = options.find(ARG_PATH); |
|
|
|
if (itr != options.end()) { |
|
|
|
if (itr != options.end()) { |
|
|
|
path_ = itr->second; |
|
|
|
path_ = itr->second; |
|
|
|
|
|
|
|
if (db_path_.empty()) { |
|
|
|
|
|
|
|
db_path_ = path_; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1485,6 +1488,8 @@ void DBDumperCommand::DoDumpCommand() { |
|
|
|
ReadableTime(ttl_start).c_str(), ReadableTime(ttl_end).c_str()); |
|
|
|
ReadableTime(ttl_start).c_str(), ReadableTime(ttl_end).c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HistogramImpl vsize_hist; |
|
|
|
|
|
|
|
|
|
|
|
for (; iter->Valid(); iter->Next()) { |
|
|
|
for (; iter->Valid(); iter->Next()) { |
|
|
|
int rawtime = 0; |
|
|
|
int rawtime = 0; |
|
|
|
// If end marker was specified, we stop before it
|
|
|
|
// If end marker was specified, we stop before it
|
|
|
@ -1529,7 +1534,9 @@ void DBDumperCommand::DoDumpCommand() { |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (count_only_) { |
|
|
|
|
|
|
|
vsize_hist.Add(iter->value().size()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!count_only_ && !count_delim_) { |
|
|
|
if (!count_only_ && !count_delim_) { |
|
|
|
if (is_db_ttl_ && timestamp_) { |
|
|
|
if (is_db_ttl_ && timestamp_) { |
|
|
@ -1551,6 +1558,11 @@ void DBDumperCommand::DoDumpCommand() { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
fprintf(stdout, "Keys in range: %lld\n", (long long) count); |
|
|
|
fprintf(stdout, "Keys in range: %lld\n", (long long) count); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (count_only_) { |
|
|
|
|
|
|
|
fprintf(stdout, "Value size distribution: \n"); |
|
|
|
|
|
|
|
fprintf(stdout, "%s\n", vsize_hist.ToString().c_str()); |
|
|
|
|
|
|
|
} |
|
|
|
// Clean up
|
|
|
|
// Clean up
|
|
|
|
delete iter; |
|
|
|
delete iter; |
|
|
|
} |
|
|
|
} |
|
|
|