Mr. A. Phillipson,                                               23/08/90
Elm Cottage,
The Avenue,                 Your ref. BEEBUG Risc User member no. Q124007
Madingley,
Cambridge,
CB3 8AD

Dear Sir;

          As promised recently on the telephone, here is my next item for
publication - the WIMP speedometer. It is much more accurate and readable
than the very vague "Usage" graph on one of the application discs
supplied with the machine.

          It continually measures the speed at which the WIMP is running
in poll cycles per seccond. A poll cycle is defined as the WIMP servicing
all of the running tasks through their poll loops once. Thus, the more
tasks there are running, the slower the speed. Also, if several of the
tasks have complex background activities to deal with (e.g. keeping
graphic WIMP windows up to date or dealing with unnecessary or null poll
codes) the speed will be slower than it would be if these things were not
going on. Conversely, the speeds will be higher on a machine fitted with
the ARM-3 processor than on a machine with an ARM-2 processor.

          This speedometer is designed to compliment the WIMP message
monitor to help users work out how the WIMP works. E.G. noticing that the
speed dramatically reeduces when the mouse pointer is moved over a
specific window or icon and increases again when the mouse pointer is
moved away from the window or icon in question gives a clue as to how the
WIMP program which is responsible for the window or icon in question
woirks.

          This speedometer has two display windows. They can be opened
and closed indipendantly of each other using the "Readout" and "Graph"
items in the programs' menu. (These are the same style of window
open/close controls as used in the message monitor.) The menu can be
obtained by clicking the menu button on the programs' icon bar icon or
either of the programs' display windows when they are open.


THE WINDOWS
          The "Readout" window is a simple icon display giving the
current speed and the average speed over the last minute (60 secconds).
The "Graph" display is a scrolling graph which can be set to whatever
scale the user wishes, using the "Graph" sub_menu as follows;

          The first sub_menu is a single item menu headed "Graph size"
which toggles between "Automatic" and "Manual". These are the graph
display modes which are as follows;

AUTOMATIC
          The graph is as large as will fit into the visible area of the
graph window on the screen. Dragging the scroll bars of the window will
move them but have no effect on the graph itself. Dragging the size icon
of the window or clicking on its' toggle size icon will AUTOMATICally
resize the graph to fit into the new visible area.

MANUAL                                                                 
          The graph is as big as will fit into the overall work area of
the window. Dragging the scroll bars of the window will move the visible
area arround the window in the normal way. To alter the overall size of
the graph, you must MANUALly alter the size of the graph windows' work
area.
          The default on start-up is automatic mode.

          This menu item has a further sub_menu in the form of a large
dialogue box which you use to alter the scale of the graph and the size
of the graph windows' work area. The controls are as follows;

THE GRAPH
          The vertical axis shows the speed. Use the writable icons to
enter the new maximum and minimum speeds required. The range of values
allowed is 0 to 9999 inclusive. The maximum and minimum speeds cannot be
equal to each other. The default on start-up is 0 to 250
          The horisontal axis is the time in secconds ago. Use the
writable icons to enter the new times required. The range of values
allowed is 1 to 60 inclusive. It is possible to get a time-delayed graph
by setting the lower of these times to a number greater than 1. The
default on start-up is 1 to 10, scrolling right to left.

GRAPH WINDOW SIZE
          These are the vertical and horisontal size of the graph
windows' work area in the same units as those used by the WIMP. The range
allowed is 500 to 9999 inclusive in both directions. The default on
start-up is 1000 in both directions.

          If an attempt is made to set values which are out-of-range, the
computer will set the offending values to the nearest possible.

ADITIONAL CONTROLS;
          Clicking on the "Secconds ago" icon with select or adjust swaps
the values in the two writable icons on the time axis, thus reversing the
direction in which the graph scrolls.
          Clicking on the "UPDATE" icon with select or adjust updates the
graph scale and window size to the values you have put into the writable
icons. If you used the select button, the menu structure is closed,
otherwise it stays open. (To reverse the scroll direction, you must click
on the "Secconds ago" icon and then on the "UPDATE" icon - or use the
keyboard equivalents.)

KEYBOARD CONTROLS;
          When the dialogue box is open, the following keyboard controls
are availiable in addition to those provided as standard by the WIMP for
writable icons;

KEY                              ACTION

Upward-pointing arrow:           These two cursor keys move the caret
Downward-pointing arrow:         around between the writable icons.

Space bar:                       Equivalent to clicking on the
                                 "Secconds ago" icon.

Return / Enter:                  Equivalent to clicking adjust on
                                 the "UPDATE" icon.

Shift-Return / Shift-Enter       Equivalent to clicking select on
                                 the "UPDATE" icon.                      


HOW IT WORKS
          The program works by repeatedly counting how many times it
receives a poll code from the wimp, resetting the counter to 0 each
seccond (by keeping a check on the monotonic clock) and storing the
values thus counted in a one-dimensional array. The array keeps them for
60 secconds and then forgets them, on a first-in, first-out basis. The
program can then display information from these values in its' windows.
The "Current speed" is the value which has just been put into the queue,
and is displayed whille the computer counts the next value to put into
the queue. The average speed is the mean of all of the values currently
in the queue. (For the first minute while the program gets started, the
"empty" locations in the queue are set to 0, so the average speed reading
does not give a valid reading until 60 secconds after the program has
started.) The graph can show any range of values in the queue, and at any
scale required. (1 seccond ago = the value just put into the queue, 60
secconds ago = the value about to fall out of the queue.)

-------------------------------------------------------------------------

PLEASE NOTE
          Several of the icons in the dialogue box used to set the size
and scale of the graph have arrowheads in their text. These characters
() can be obtained from the keyboard by holding down one of the "Alt"
keys (like a "Shift" key) and typing the ASCII code of the character
required on the numeric keypad. The character then appears when you
release the "Alt" key. The ASCII codes required are;

          136 arrow pointing left
          137 arrow pointing right
          138 arrow pointing down
          139 arrow pointing up


          When graphing large ranges on the time axis, cumulative errors
may occour as a result of the width of the graph bars not being an
integer. This can be noticable when the graph is re-drawn after a menu or
window has been on top of it. This problem rectifies itself when the WIMP
has to redraw the entire graph (after the scale or display mode has been
altered). This problem could have been avoided by redrawing the entire
graph each tine the graph needed scrolling, but that approach resulted in
the graph flickering like an ancient cinema film. (Set the two values on
the time axis equal to each other to see what I mean.)


          The application directory contains 6 files. They are;

          1) ReadMe    This text file

          2) !Run
          3) !Runimage The program files
          4) Library

          5) Templates The programs' template file
(4 windows - the readout display, the graph display, the graph control
dalogue box and the "about this program" dialogue box)

          6) !Sprites  The programs' sprite file
(1 sprite - used only in the icon bar)


                            Yours faithfully,


                      __________________________

                            A. Phillipson

