| |
Tom Erickson's Weblog
Tom Erickson's Weblog
Tuesday December 16, 2008 |
|
As I was scrolling through output of the dtrace command recently, it struck me that the command line allowed me to do something I could not do with Chime: look back at recent data. It bothered me to see Chime at a disadvantage in terms of visibility, where it actually tries to excel over the command line.
To remedy this, I added controls to provide the equivalent of scrolling in a command terminal. Since Chime already has a scrollbar to view whatever part of the current aggregate snapshot doesn't fit in the window, it didn't make sense for a scrollbar to access previous snapshots as well. Instead I added forward and back buttons next to the pause button in the lower right corner.
The forward button is disabled because we're normally looking at the most recent aggregate snapshot. I replaced the text of the pause button with an icon so that the button no longer changes width when switching the text from "Pause" to "Resume" and back. Changing the button width shifts the location of the forward and back buttons by the difference in width, whereas switching same-size icons leaves the buttons in place and also looks cleaner.
Clicking the back button automatically pauses the display and steps it to the previous aggregate snapshot.
Clicking the back button repeatedly moves the spark backward on the sparkline until reaching the oldest snapshot in the recent data cache.
I chose ten as the default limit of the recent data cache, since I didn't want to consume a lot of memory, and the most recent snapshots are usually all you want to see. If you want to be able to scroll back farther, you can set the number of steps in the recent data cache using the Options menu.
While the display is paused, you can step forward and back through recent aggregate snapshots in a temporary copy of the cache. The actual cache continues to add new snapshots at the front and roll old snapshots off the back as data comes in. To resume the display of current data, click the pause/resume button (displaying the resume icon while paused).
Another convenience of the command line is that in the case of data drops, you can easily change option values and re-run the command. That convenience is next on my list of things to add to Chime.
Get the latest version of Chime (1.4.39) to try out the forward and back buttons (link here). The latest version also includes a large number of scripts from the DTraceToolkit, including a new Ruby category.
( Dec 16 2008, 02:29:53 PM PST / Dec 16 2008, 02:29:53 PM PST )
Permalink
Trackback: http://blogs.sun.com/tomee/entry/chime_data_scrolling
|
|
|
|
| « December 2008 » | | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | | 17 | 18 | | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | | | | | | | | | | | Today |
Today's Page Hits: 54
|