diff --git a/core b/core index 5d077e8..386b543 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 5d077e82cf855a441d664b0c5968db2c56de5b96 +Subproject commit 386b543405c8932045500bef836adea5d8f5abae diff --git a/drawing/Common.lua b/drawing/Common.lua index 9cbf302..dcb9e33 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -510,7 +510,8 @@ M.initTextRows_color = function(x, y, w, spacing, labels, color, format) #labels, _text_row_style('right', color), format, - spacing + spacing, + 0 ) } end diff --git a/drawing/Memory.lua b/drawing/Memory.lua index 9e13936..a6de42f 100644 --- a/drawing/Memory.lua +++ b/drawing/Memory.lua @@ -76,7 +76,7 @@ return function(update_freq) SWAP_BUFFERS_WIDTH, TEXT_SPACING, {'Page Cache', 'Buffers', 'Kernel Slab'}, - '%s%%' + '%.1f%%' ) ----------------------------------------------------------------------------- @@ -135,19 +135,13 @@ return function(update_freq) Dial.set(dial, used_percent) Common.text_ring_set(text_ring, cr, Util.round_to_string(used_percent * 100)) - Common.text_row_crit_set(swap, cr, - Util.precision_round_to_string( - (swap_total_kb - swap_free_kb) - / swap_total_kb * 100)) + Common.text_row_crit_set( + swap, cr, (swap_total_kb - swap_free_kb) / swap_total_kb * 100 + ) - Common.text_rows_set(cache, cr, 1, Util.precision_round_to_string( - cached_kb / mem_total_kb * 100)) - - Common.text_rows_set(cache, cr, 2, Util.precision_round_to_string( - buffers_kb / mem_total_kb * 100)) - - Common.text_rows_set(cache, cr, 3, Util.precision_round_to_string( - slab_reclaimable_kb / mem_total_kb * 100)) + Common.text_rows_set(cache, cr, 1, cached_kb / mem_total_kb * 100) + Common.text_rows_set(cache, cr, 2, buffers_kb / mem_total_kb * 100) + Common.text_rows_set(cache, cr, 3, slab_reclaimable_kb / mem_total_kb * 100) Timeseries.update(plot, used_percent)