Richard Hughes ([info]hughsient) wrote,

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

    Error

    Comments allowed for friends only

    Anonymous comments are disabled in this journal

    Your reply will be screened

    Your IP address will be recorded 

  • 9 comments

Anonymous

September 22 2006, 15:53:06 UTC 5 years ago

you just moved memory around

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?

[info]hughsient

September 22 2006, 19:57:24 UTC 5 years ago

Re: you just moved memory around

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.

[info]lilymybup

July 16 2008, 04:29:50 UTC 3 years ago

As far as I can tell, what you say doesn't apply to the Qt widget classes, since they're not templated.

Anonymous

September 22 2006, 15:59:31 UTC 5 years ago

Plot Widget?

The plot and legend are nice. Did you use a particular widget or are they custom?

[info]hughsient

September 22 2006, 19:54:20 UTC 5 years ago

Re: Plot Widget?

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.

Anonymous

September 22 2006, 16:37:36 UTC 5 years ago

Awesome

Very cool.

Anonymous

September 22 2006, 16:58:10 UTC 5 years ago

Colors

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

[info]hughsient

September 22 2006, 20:08:52 UTC 5 years ago

Re: Colors

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

Anonymous

September 22 2006, 17:09:14 UTC 5 years ago

Always show legend

Very cool graphs. One thing though: I'd always show the legend and remove the checkbox.
Create an Account
Forgot your login or password?
Facebook Twitter More login options
English • Español • Deutsch • Русский…