@ -770,7 +770,9 @@ void InternalStats::DumpCFStats(std::string* value) {
}
}
}
}
uint64_t curr_ingest = cf_stats_value_ [ BYTES_FLUSHED ] ;
uint64_t flush_ingest = cf_stats_value_ [ BYTES_FLUSHED ] ;
uint64_t add_file_ingest = cf_stats_value_ [ BYTES_INGESTED_ADD_FILE ] ;
uint64_t curr_ingest = flush_ingest + add_file_ingest ;
// Cumulative summary
// Cumulative summary
double w_amp = stats_sum . bytes_written / static_cast < double > ( curr_ingest + 1 ) ;
double w_amp = stats_sum . bytes_written / static_cast < double > ( curr_ingest + 1 ) ;
uint64_t total_stall_count =
uint64_t total_stall_count =
@ -785,8 +787,12 @@ void InternalStats::DumpCFStats(std::string* value) {
stats_sum ) ;
stats_sum ) ;
value - > append ( buf ) ;
value - > append ( buf ) ;
// Interval summary
// Interval summary
uint64_t interval_flush_ingest =
flush_ingest - cf_stats_snapshot_ . ingest_bytes_flush ;
uint64_t interval_add_file_inget =
add_file_ingest - cf_stats_snapshot_ . ingest_bytes_add_file ;
uint64_t interval_ingest =
uint64_t interval_ingest =
curr_ingest - cf_stats_snapshot_ . ingest_bytes + 1 ;
interval_flush_ingest + interval_add_file_inget + 1 ;
CompactionStats interval_stats ( stats_sum ) ;
CompactionStats interval_stats ( stats_sum ) ;
interval_stats . Subtract ( cf_stats_snapshot_ . comp_stats ) ;
interval_stats . Subtract ( cf_stats_snapshot_ . comp_stats ) ;
w_amp = interval_stats . bytes_written / static_cast < double > ( interval_ingest ) ;
w_amp = interval_stats . bytes_written / static_cast < double > ( interval_ingest ) ;
@ -799,9 +805,10 @@ void InternalStats::DumpCFStats(std::string* value) {
seconds_up , interval_seconds_up ) ;
seconds_up , interval_seconds_up ) ;
value - > append ( buf ) ;
value - > append ( buf ) ;
snprintf ( buf , sizeof ( buf ) ,
snprintf ( buf , sizeof ( buf ) , " Flush(GB): cumulative %.3f, interval %.3f \n " ,
" Flush(GB): cumulative %.3f, interval %.3f \n " ,
flush_ingest / kGB , interval_flush_ingest / kGB ) ;
curr_ingest / kGB , interval_ingest / kGB ) ;
snprintf ( buf , sizeof ( buf ) , " AddFile(GB): cumulative %.3f, interval %.3f \n " ,
add_file_ingest / kGB , interval_add_file_inget / kGB ) ;
value - > append ( buf ) ;
value - > append ( buf ) ;
// Compact
// Compact
@ -873,7 +880,8 @@ void InternalStats::DumpCFStats(std::string* value) {
total_stall_count - cf_stats_snapshot_ . stall_count ) ;
total_stall_count - cf_stats_snapshot_ . stall_count ) ;
value - > append ( buf ) ;
value - > append ( buf ) ;
cf_stats_snapshot_ . ingest_bytes = curr_ingest ;
cf_stats_snapshot_ . ingest_bytes_flush = flush_ingest ;
cf_stats_snapshot_ . ingest_bytes_add_file = add_file_ingest ;
cf_stats_snapshot_ . comp_stats = stats_sum ;
cf_stats_snapshot_ . comp_stats = stats_sum ;
cf_stats_snapshot_ . stall_count = total_stall_count ;
cf_stats_snapshot_ . stall_count = total_stall_count ;
}
}