diff --git a/core b/core index 59944cc..94997a4 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 59944cce6d8d92f47ef939b0a4d9629dd92cbd11 +Subproject commit 94997a4f2e41b254a47e423da793581e1a55c3bd diff --git a/drawing/Common.lua b/drawing/Common.lua index 0782c20..852cb98 100644 --- a/drawing/Common.lua +++ b/drawing/Common.lua @@ -197,9 +197,11 @@ end -------------------------------------------------------------------------------- -- scaled plot -M.base_2_scale_data = _G_Widget_.scale_data(2, 0, 0.9) +M.base_2_scale_data = function(m) + return _G_Widget_.scale_data(2, m, 0.9) +end -M.initThemedScalePlot = function(x, y, w, h, f) +M.initThemedScalePlot = function(x, y, w, h, f, min_domain) return _G_Widget_.ScalePlot( _G_Widget_.make_box(x, y, w, h), 1 / _G_INIT_DATA_.UPDATE_INTERVAL, @@ -209,14 +211,15 @@ M.initThemedScalePlot = function(x, y, w, h, f) M.label_font_spec, f ), - M.base_2_scale_data + M.base_2_scale_data(min_domain) ) end -------------------------------------------------------------------------------- -- scaled plot (with textual data above it) -M.initLabeledScalePlot = function(x, y, w, h, format_fun, label_fun, spacing, label) +M.initLabeledScalePlot = function(x, y, w, h, format_fun, label_fun, spacing, + label, min_domain) return { label = _left_text(_G_Widget_.make_point(x, y), label), value = _G_Widget_.formatted_text( @@ -225,7 +228,7 @@ M.initLabeledScalePlot = function(x, y, w, h, format_fun, label_fun, spacing, la M.right_text_style, format_fun ), - plot = M.initThemedScalePlot(x, y + spacing, w, h, label_fun), + plot = M.initThemedScalePlot(x, y + spacing, w, h, label_fun, min_domain), } end diff --git a/drawing/Network.lua b/drawing/Network.lua index 1f642a2..9a3fcb6 100644 --- a/drawing/Network.lua +++ b/drawing/Network.lua @@ -34,7 +34,8 @@ local dnload = Common.initLabeledScalePlot( value_format_function, network_label_function, _PLOT_SEC_BREAK_, - 'Download' + 'Download', + 2 ) local upload = Common.initLabeledScalePlot( @@ -45,7 +46,8 @@ local upload = Common.initLabeledScalePlot( value_format_function, network_label_function, _PLOT_SEC_BREAK_, - 'Upload' + 'Upload', + 2 ) local interface_counters_tbl = {} diff --git a/drawing/Power.lua b/drawing/Power.lua index 6613baf..3528536 100644 --- a/drawing/Power.lua +++ b/drawing/Power.lua @@ -45,7 +45,8 @@ local pkg0 = Common.initLabeledScalePlot( power_format_function, power_label_function, _PLOT_SEC_BREAK_, - 'PKG0' + 'PKG0', + 0 ) local _CORE_Y_ = header.bottom_y + _TEXT_SPACING_ + _PLOT_SEC_BREAK_ + _PLOT_HEIGHT_ @@ -58,7 +59,8 @@ local dram = Common.initLabeledScalePlot( power_format_function, power_label_function, _PLOT_SEC_BREAK_, - 'DRAM' + 'DRAM', + 0 ) dram.value.append_end = ' W' @@ -70,7 +72,8 @@ local battery_draw = Common.initLabeledScalePlot( ac_format_function, power_label_function, _PLOT_SEC_BREAK_, - 'Battery Draw' + 'Battery Draw', + 0 ) local PKG0_PATH = '/sys/class/powercap/intel-rapl:0/energy_uj' diff --git a/drawing/ReadWrite.lua b/drawing/ReadWrite.lua index f24336a..f2f3ba5 100644 --- a/drawing/ReadWrite.lua +++ b/drawing/ReadWrite.lua @@ -65,7 +65,9 @@ local reads = Common.initLabeledScalePlot( format_value_function, io_label_function, _PLOT_SEC_BREAK_, - 'Reads' + 'Reads', + 2 + ) local writes = Common.initLabeledScalePlot( @@ -76,9 +78,11 @@ local writes = Common.initLabeledScalePlot( format_value_function, io_label_function, _PLOT_SEC_BREAK_, - 'Writes' + 'Writes', + 2 ) + _PLOT_SEC_BREAK_ = nil _PLOT_HEIGHT_ = nil