REF add some timing data
This commit is contained in:
parent
b2fe79705c
commit
60157ab71a
14
main.lua
14
main.lua
|
@ -60,22 +60,34 @@ function conky_start(update_interval)
|
||||||
local STATS_FILE = '/tmp/.conky_pacman'
|
local STATS_FILE = '/tmp/.conky_pacman'
|
||||||
|
|
||||||
draw_dynamic = function(cr, _updates)
|
draw_dynamic = function(cr, _updates)
|
||||||
|
-- timings of each line when cpu set to performance
|
||||||
|
-- 0.7ms
|
||||||
draw_static(cr)
|
draw_static(cr)
|
||||||
|
|
||||||
local t1 = _updates % (update_freq * 10)
|
local t1 = _updates % (update_freq * 10)
|
||||||
local is_using_ac = using_ac()
|
|
||||||
local pacman_stats = Util.read_file(STATS_FILE)
|
local pacman_stats = Util.read_file(STATS_FILE)
|
||||||
|
-- 0.1ms
|
||||||
|
local is_using_ac = using_ac()
|
||||||
|
|
||||||
|
-- <0.1ms
|
||||||
sys.dynamic(cr, pacman_stats)
|
sys.dynamic(cr, pacman_stats)
|
||||||
|
-- 0.3ms
|
||||||
gfx.dynamic(cr)
|
gfx.dynamic(cr)
|
||||||
|
-- 0.8-1.1ms
|
||||||
proc.dynamic(cr, t1)
|
proc.dynamic(cr, t1)
|
||||||
|
|
||||||
|
-- 0.1-0.3ms
|
||||||
rw.dynamic(cr)
|
rw.dynamic(cr)
|
||||||
|
-- 0.2ms
|
||||||
net.dynamic(cr)
|
net.dynamic(cr)
|
||||||
|
|
||||||
|
-- <0.1ms
|
||||||
pcm.dynamic(cr, pacman_stats)
|
pcm.dynamic(cr, pacman_stats)
|
||||||
|
-- <0.1ms
|
||||||
fs.dynamic(cr, t1)
|
fs.dynamic(cr, t1)
|
||||||
|
-- 0.3ms
|
||||||
pwr.dynamic(cr, is_using_ac)
|
pwr.dynamic(cr, is_using_ac)
|
||||||
|
-- 0.5ms
|
||||||
mem.dynamic(cr)
|
mem.dynamic(cr)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue