public void populateSaving ( RaidNodeMetrics metrics ) { if ( lastRaidStatistics == null ) { return ; } long saving = 0 ; for ( Codec codec : Codec . getCodecs ( ) ) { String code = codec . id ; long s = lastRaidStatistics . get ( code ) . getSaving ( conf ) ; if ( s > 0 ) { metrics . savingForCode . get ( code ) . set ( s ) ; saving += s ; } } if ( saving > 0 ) { metrics . saving . set ( saving ) ; } }
Populate RAID savings by code and total .