Richard Hughes ([info]hughsient) wrote,
@ 2006-09-22 16:30:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
gnome-power-statistics
Lots of people has recently been striving to get down the memory requirement of thier GNOME application or deamon.

I've recently created an out of process (the old one was in-process for each instance) graphing program, gnome-power-statistics. The displayable name is yet to be decided, but it's basically a graph viewer that talks to gnome-power-manager over DBUS to the shiny new org.gnome.PowerManager.Statistics interface.


Notice the surge in power usage as I start "make distcheck" on HAL in the 23rd minute.

Now, I know the application really needs some HIG love, but this removes a whole chunk of memory from the session daemon, namely 500kb of writable memory.

Comments welcome.



(Post a new comment)

you just moved memory around
(Anonymous)
2006-09-22 03:53 pm UTC (link)
As far as I can tell you've only moved the memory from the session daemon to gnome power manager daemon. There is only one instance of each of those programs running, so where are the savings?

(Reply to this) (Thread)

Re: you just moved memory around
[info]hughsient
2006-09-22 07:57 pm UTC (link)
I'm not quite sure what you mean, and gnome-power-manager is a session daemon.
The saving comes from two points.
* If you have more than one instance of gnome-power-manager per computer (e.g. more than one logged in user)
* If you are not looking at the graphs. When you close gnome-power-statistics, the widget memory is freed, but the data (very small) stays on the session-server.

(Reply to this) (Parent)


[info]lilymybup
2008-07-16 04:29 am UTC (link)
As far as I can tell, what you say doesn't apply to the Qt widget classes, since they're not templated.

(Reply to this) (Parent)

Plot Widget?
(Anonymous)
2006-09-22 03:59 pm UTC (link)
The plot and legend are nice. Did you use a particular widget or are they custom?

(Reply to this) (Thread)

Re: Plot Widget?
[info]hughsient
2006-09-22 07:54 pm UTC (link)
Custom. I've written the widget to be fairly generic, so in theory you could use it for other stuff. Take a look at gpm-graph-widget.c in CVS and tell me what you think.

(Reply to this) (Parent)

Awesome
(Anonymous)
2006-09-22 04:37 pm UTC (link)
Very cool.

(Reply to this)

Colors
(Anonymous)
2006-09-22 04:58 pm UTC (link)
Richard, this looks really nice, but the use of colors creates a real accessibility problem for people with various forms of color blindness. Try running the screenshot through Vischeck:

http://www.vischeck.com/vischeck/vischeckImage.php

Using color alone as an indicator should be avoided, particularly for more than about six states. Even people with normal color perception can have a difficult time keeping a mental map of twelve colors.

In this case, I would recommend adjusting the line colors so they have discernable brightness values, and changing the event circles to use a combination of shapes and colors. You could use a different shape for each class of event (power source, LCD, DPMS, suspend/hibernate/resume, lid, notification), and a set of brightness-distinguishable colors for the event itself.

The event classes needn't all use the same two or three colors. For example, "On AC" could be a light blue diamond, and "On battery" could be a dark blue diamond. "LCD dim" could be a dark red square, and "LCD resume" could be a light red square. For people with normal color perception, the combination of shapes and colors makes it even easier to create a mental map, while even black-and-white color-blind people (very rare) will still be able to use the shapes and brightness.

Feel free to ping me on IRC.

//shaunm

(Reply to this) (Thread)

Re: Colors
[info]hughsient
2006-09-22 08:08 pm UTC (link)
Thanks for your reply, I really need good feedback like this. Cheers also for the link, I see what you mean.

What about:

circle light blue ON_AC
circle dark blue ON_BATTERY
square dark yellow SCREEN_DIM
square light yellow SCREEN_RESUME
star red SUSPEND
star dark red HIBERNATE
star pink RESUME
triangle light green LID_CLOSED
triangle dark green LID_OPENED
! mark NOTIFICATION

(Reply to this) (Parent)

Always show legend
(Anonymous)
2006-09-22 05:09 pm UTC (link)
Very cool graphs. One thing though: I'd always show the legend and remove the checkbox.

(Reply to this)


Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…