|
|
|
@ -300,6 +300,7 @@ void InternalStats::DumpDBStats(std::string* value) { |
|
|
|
|
uint64_t wal_bytes = db_stats_[InternalStats::WAL_FILE_BYTES]; |
|
|
|
|
uint64_t wal_synced = db_stats_[InternalStats::WAL_FILE_SYNCED]; |
|
|
|
|
uint64_t write_with_wal = db_stats_[InternalStats::WRITE_WITH_WAL]; |
|
|
|
|
uint64_t write_stall_micros = db_stats_[InternalStats::WRITE_STALL_MICROS]; |
|
|
|
|
// Data
|
|
|
|
|
// writes: total number of write requests.
|
|
|
|
|
// keys: total number of key updates issued by all the write requests
|
|
|
|
@ -311,10 +312,11 @@ void InternalStats::DumpDBStats(std::string* value) { |
|
|
|
|
// The format is the same for interval stats.
|
|
|
|
|
snprintf(buf, sizeof(buf), |
|
|
|
|
"Cumulative writes: %" PRIu64 " writes, %" PRIu64 " keys, %" PRIu64 |
|
|
|
|
" batches, %.1f writes per batch, %.2f GB user ingest\n", |
|
|
|
|
" batches, %.1f writes per batch, %.2f GB user ingest, " |
|
|
|
|
"stall micros: %" PRIu64 "\n", |
|
|
|
|
write_other + write_self, num_keys_written, write_self, |
|
|
|
|
(write_other + write_self) / static_cast<double>(write_self + 1), |
|
|
|
|
user_bytes_written / kGB); |
|
|
|
|
user_bytes_written / kGB, write_stall_micros); |
|
|
|
|
value->append(buf); |
|
|
|
|
// WAL
|
|
|
|
|
snprintf(buf, sizeof(buf), |
|
|
|
@ -332,12 +334,14 @@ void InternalStats::DumpDBStats(std::string* value) { |
|
|
|
|
num_keys_written - db_stats_snapshot_.num_keys_written; |
|
|
|
|
snprintf(buf, sizeof(buf), |
|
|
|
|
"Interval writes: %" PRIu64 " writes, %" PRIu64 " keys, %" PRIu64 |
|
|
|
|
" batches, %.1f writes per batch, %.1f MB user ingest\n", |
|
|
|
|
" batches, %.1f writes per batch, %.1f MB user ingest, " |
|
|
|
|
"stall micros: %" PRIu64 "\n", |
|
|
|
|
interval_write_other + interval_write_self, |
|
|
|
|
interval_num_keys_written, interval_write_self, |
|
|
|
|
static_cast<double>(interval_write_other + interval_write_self) / |
|
|
|
|
(interval_write_self + 1), |
|
|
|
|
(user_bytes_written - db_stats_snapshot_.ingest_bytes) / kMB); |
|
|
|
|
(user_bytes_written - db_stats_snapshot_.ingest_bytes) / kMB, |
|
|
|
|
write_stall_micros - db_stats_snapshot_.write_stall_micros); |
|
|
|
|
value->append(buf); |
|
|
|
|
|
|
|
|
|
uint64_t interval_write_with_wal = |
|
|
|
@ -363,6 +367,7 @@ void InternalStats::DumpDBStats(std::string* value) { |
|
|
|
|
db_stats_snapshot_.wal_bytes = wal_bytes; |
|
|
|
|
db_stats_snapshot_.wal_synced = wal_synced; |
|
|
|
|
db_stats_snapshot_.write_with_wal = write_with_wal; |
|
|
|
|
db_stats_snapshot_.write_stall_micros = write_stall_micros; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void InternalStats::DumpCFStats(std::string* value) { |
|
|
|
|