split plotting to static and dynamic

This commit is contained in:
petrucci4prez 2018-08-05 14:29:52 -04:00
parent 3be242ef32
commit fbf69531a6
7 changed files with 26 additions and 18 deletions

2
core

@ -1 +1 @@
Subproject commit 17b93c4cc6eb1ace1e79e388f710dd27fd069536 Subproject commit f9e96aa82dfc3c0772350fbe2e73f050ca38f39d

View File

@ -282,8 +282,13 @@ local draw_static = function(cr)
Line.draw(separator3, cr) Line.draw(separator3, cr)
Text.draw(gpu_util.label, cr) Text.draw(gpu_util.label, cr)
LabelPlot.draw_static(gpu_util.plot, cr)
Text.draw(mem_util.label, cr) Text.draw(mem_util.label, cr)
LabelPlot.draw_static(mem_util.plot, cr)
Text.draw(vid_util.label, cr) Text.draw(vid_util.label, cr)
LabelPlot.draw_static(vid_util.plot, cr)
end end
local draw_dynamic = function(cr) local draw_dynamic = function(cr)
@ -294,13 +299,13 @@ local draw_dynamic = function(cr)
TextColumn.draw(clock_speed.values, cr) TextColumn.draw(clock_speed.values, cr)
Text.draw(gpu_util.value, cr) Text.draw(gpu_util.value, cr)
LabelPlot.draw(gpu_util.plot, cr) LabelPlot.draw_dynamic(gpu_util.plot, cr)
Text.draw(mem_util.value, cr) Text.draw(mem_util.value, cr)
LabelPlot.draw(mem_util.plot, cr) LabelPlot.draw_dynamic(mem_util.plot, cr)
Text.draw(vid_util.value, cr) Text.draw(vid_util.value, cr)
LabelPlot.draw(vid_util.plot, cr) LabelPlot.draw_dynamic(vid_util.plot, cr)
end end
M.draw_static = draw_static M.draw_static = draw_static

View File

@ -206,6 +206,7 @@ local draw_static = function(cr)
Text.draw(swap.label, cr) Text.draw(swap.label, cr)
TextColumn.draw(cache.labels, cr) TextColumn.draw(cache.labels, cr)
LabelPlot.draw_static(plot, cr)
Table.draw_static(tbl, cr) Table.draw_static(tbl, cr)
end end
@ -220,7 +221,7 @@ local draw_dynamic = function(cr)
CriticalText.draw(swap.percent, cr) CriticalText.draw(swap.percent, cr)
TextColumn.draw(cache.percents, cr) TextColumn.draw(cache.percents, cr)
LabelPlot.draw(plot, cr) LabelPlot.draw_dynamic(plot, cr)
Table.draw_dynamic(tbl, cr) Table.draw_dynamic(tbl, cr)
end end

View File

@ -144,10 +144,10 @@ local draw_dynamic = function(cr, update_frequency)
update(cr, update_frequency) update(cr, update_frequency)
Text.draw(dnload.speed, cr) Text.draw(dnload.speed, cr)
ScalePlot.draw(dnload.plot, cr) ScalePlot.draw_dynamic(dnload.plot, cr)
Text.draw(upload.speed, cr) Text.draw(upload.speed, cr)
ScalePlot.draw(upload.plot, cr) ScalePlot.draw_dynamic(upload.plot, cr)
end end
M.draw_static = draw_static M.draw_static = draw_static

View File

@ -212,28 +212,29 @@ _CORE_Y_ = nil
_BATTERY_DRAW_Y_ = nil _BATTERY_DRAW_Y_ = nil
local draw_static = function(cr) local draw_static = function(cr)
Text.draw(header.text, cr)
Line.draw(header.underline, cr)
TextColumn.draw(pkg0.labels, cr)
Text.draw(dram.label, cr)
Text.draw(battery_draw.label, cr)
end end
local draw_dynamic = function(cr, update_frequency, is_using_ac) local draw_dynamic = function(cr, update_frequency, is_using_ac)
update(cr, update_frequency, is_using_ac) update(cr, update_frequency, is_using_ac)
Text.draw(header.text, cr)
Line.draw(header.underline, cr)
TextColumn.draw(pkg0.labels, cr)
Text.draw(pkg0.llcmc_value, cr) Text.draw(pkg0.llcmc_value, cr)
Text.draw(pkg0.core_value, cr) Text.draw(pkg0.core_value, cr)
Text.draw(pkg0.igpu_value, cr) Text.draw(pkg0.igpu_value, cr)
ScalePlot.draw(pkg0.plot, cr) ScalePlot.draw_dynamic(pkg0.plot, cr)
Text.draw(dram.label, cr)
Text.draw(dram.value, cr) Text.draw(dram.value, cr)
ScalePlot.draw(dram.plot, cr) ScalePlot.draw_dynamic(dram.plot, cr)
Text.draw(battery_draw.label, cr)
Text.draw(battery_draw.value, cr) Text.draw(battery_draw.value, cr)
ScalePlot.draw(battery_draw.plot, cr) ScalePlot.draw_dynamic(battery_draw.plot, cr)
end end
M.draw_static = draw_static M.draw_static = draw_static

View File

@ -265,6 +265,7 @@ local draw_static = function(cr)
Line.draw(separator, cr) Line.draw(separator, cr)
Text.draw(total_load.label, cr) Text.draw(total_load.label, cr)
LabelPlot.draw_static(plot, cr)
Table.draw_static(tbl, cr) Table.draw_static(tbl, cr)
end end
@ -282,7 +283,7 @@ local draw_dynamic = function(cr)
Text.draw(ave_freq.value, cr) Text.draw(ave_freq.value, cr)
CriticalText.draw(total_load.value, cr) CriticalText.draw(total_load.value, cr)
LabelPlot.draw(plot, cr) LabelPlot.draw_dynamic(plot, cr)
Table.draw_dynamic(tbl, cr) Table.draw_dynamic(tbl, cr)
end end

View File

@ -131,10 +131,10 @@ local draw_dynamic = function(cr, update_frequency)
update(cr, update_frequency) update(cr, update_frequency)
Text.draw(reads.rate, cr) Text.draw(reads.rate, cr)
ScalePlot.draw(reads.plot, cr) ScalePlot.draw_dynamic(reads.plot, cr)
Text.draw(writes.rate, cr) Text.draw(writes.rate, cr)
ScalePlot.draw(writes.plot, cr) ScalePlot.draw_dynamic(writes.plot, cr)
end end
M.draw_static = draw_static M.draw_static = draw_static