[Sugar-devel] [PATCH] Add cpu and memory resource indicator to frame
James Cameron
quozl at laptop.org
Thu Jul 1 20:51:32 EDT 2010
On Thu, Jul 01, 2010 at 08:33:16PM +0530, anishmangal2002 wrote:
> This patch adds an icon to the frame, whose palette
> menu displays the memory and cpu resources. For computing
> free memory, the code reads the /proc/meminfo file (thanks
> quozl) and for computing cpu usage, the code reads the
> /proc/stat file.
>
> The palette menu entries are only updated (in one second
> intervals) when the palette menu is visible thus
> possibly saving cpu cycles.
>
> Signed-off-by: anishmangal2002 <anishmangal2002 at gmail.com>
Reviewed-by: James Cameron <quozl at laptop.org>
It is fine as is, but for future change consider scheduling an update of
the sliders as a result of the popup. At the moment I think that the
data shown will be from the last popdown until the timer cycles. The
lag is the duration of the timer.
--
James Cameron
http://quozl.linux.org.au/
More information about the Sugar-devel
mailing list