



                        PeekMessager V1.0
                      =======================



What is PeekMessager:
           PeekMessager is a little windows program that is designed to measure
        time available to us.  As name says,  PeekMessager does  only a  single
        messageloop with PeekMessage()  and counts  how  many times our program
        gains control. For example my 16mhz 386sx gets about  320 messages when
        nothing happens.  The reason why so simple proggy works is that windows
        will not process messages when some program is buzy.

Limitations:
           As said PeekMessager counts messages,  when some other  program gets
        a message our proggy is left without. This is then registered and shown
        as graph.  However there are also times when our program does not get a
        single  message  thus showing  that there is  no perfomance left.  This
        happens when:
                - Resizing window.
                - Accessing PeekMessagers menu.
                - Using PeekMessagers dialog.

           PeekMessager counts  only messages per second so short blackouts are
        not registered as total blackouts.  As an example  a disk-operation may
        take half-a-second,  so  PeekMessager shows  that there  was perfomance
        left (50%).

           PeekMessager spends  some time drawing its  own graphics,  I suppose
        this causes small peaks in graph.

           Two  PeekMessagers cannot  be run  simultaneously. Thats why opening
        second window, will only activate first one.

           Most  programs do  not use all  available perfomance  because we are
        polling with  PeekMessage().  Keep in  mind  that those  programs could
        use more perfomance if there would not be background tasks.

           It may be necessary to reset PeekMessager (by  prefs.reset) in order
        to get  real message-ratings when loading/using other programs that use
        PeekMessage(). If you do not want to lose setting simply set idle to 1.


Instructions:
           PeekMessager counts  percentages using  maximum messages-rate,  thus
        you have  to let PeekMessager  snoop around  a while when  starting the
        proggy (if you haven't saved prefs). Also  close other  applications so
        PeekMessager can get max message-rate. PeekMessager  should  show about
        ten percentages when idle and no backgroud jobs are running.

           PeekMessager does  not make  a menu of its own,  instead it is using
        systems menu. Following items will be added to menu:
                - Clear Screen  * Wipe out
                - Prefs...      * Prefs dialog
                - About         * Version info

        Prefs dialog buttons:
                - Reset         * Reset to defaults
                - Cancel        * Cancel changes
                - Ok            * Accept changes
                - Save          * Save prefs to messager.ini
        Dialog editfields:
                - Update Speed  * Update graph every x microseconds
                - Time Scale    * How many seconds will graph show (20-512)
                - Idle          * Max messagers per second, set this to 1
                                *   if Messager shows too big percentage
        Dialog radiobuttons:
                - Grid          * Show grid and numbers at background
                - Keep Scale    * Try to maintain scale when resizing
                - Save at Exit  * Save prefs when exiting

Future additons:
            I am currently trying to keep track of tasks so maybe next  version
        will show how much time  each task is using.  Also it would be  nice to
        count messages  in 1/100:th  of a second. However I am currently having
        problems with accuracy, the smaller  time  measured the  more peaks are
        registered. Future  versions might not be restricted to  PeekMessage(),
        instead  hooking for  example to  a taskswitching function or  applying
        message-filter.


About source:
           Source was done with Borland C++ v3.0.  Those who want  to recompile
        it must edit directories at project file. If it must be recompiled with
        another compiler this info may help:
         - BC++ does not necessarily need module  definition files,  instead it
           is does necessary definitions inside code (_export).
         - Following funcs should be exported in module definition file:
             WinMain, WinProc, DlgProc
         - Met.res is included in case you cannot use the met.rc
         - BC++ Needs 'cdecl' declarations, in other compilers you might not
           need them.
        Note that  since I use  tab-lenght of 2,  other editors  than BC's will
        adjust text strangely (when tabs are mixed with spaces!!).



                Toni Rnkk <tronkko@dakota.pspt.fi>



PS.  I would be interested on message-rates of different computers
      ('idle' field at prefs-dialog).
PSS. Bug reports etc welcome!!

