Home | History | Annotate | Line # | Download | only in Examples
      1  1.1  christos The following is an example of the wpm.d script.
      2  1.1  christos 
      3  1.1  christos 
      4  1.1  christos This script takes the name of a program to trace, and assumes that reads
      5  1.1  christos on file descriptor zero (STDIN) are keystrokes.
      6  1.1  christos 
      7  1.1  christos When run, a 5 second count down begins before keystrokes are measured,
      8  1.1  christos 
      9  1.1  christos    # wpm.d vim
     10  1.1  christos    Measuring will start in :  5 seconds
     11  1.1  christos 
     12  1.1  christos While running, I retyped the first three sentences of this file a few times
     13  1.1  christos which clocked the following result,
     14  1.1  christos 
     15  1.1  christos    # wpm.d vim
     16  1.1  christos    Measuring will start in :  0 seconds
     17  1.1  christos    Measuring will stop in  :  0 seconds
     18  1.1  christos    
     19  1.1  christos    Characters typed : 509
     20  1.1  christos    Words per minute : 84
     21  1.1  christos    
     22  1.1  christos    Minimum keystroke latency : 12 ms
     23  1.1  christos    Average keystroke latency : 118 ms
     24  1.1  christos    Maximum keystroke latency : 493 ms
     25  1.1  christos    
     26  1.1  christos    Word size distribution (letters),
     27  1.1  christos    
     28  1.1  christos               value  ------------- Distribution ------------- count
     29  1.1  christos                   0 |                                         0
     30  1.1  christos                   1 |@@@                                      6
     31  1.1  christos                   2 |@@@@@                                    11
     32  1.1  christos                   3 |@@@@@                                    11
     33  1.1  christos                   4 |@@@@@@                                   13
     34  1.1  christos                   5 |@@@@                                     8
     35  1.1  christos                   6 |@@@@@@                                   12
     36  1.1  christos                   7 |@@@@@                                    11
     37  1.1  christos                   8 |                                         0
     38  1.1  christos                   9 |@@                                       4
     39  1.1  christos                  10 |@                                        3
     40  1.1  christos                  11 |@                                        2
     41  1.1  christos                  12 |                                         0
     42  1.1  christos                  13 |                                         0
     43  1.1  christos                  14 |                                         1
     44  1.1  christos                  15 |                                         0
     45  1.1  christos    
     46  1.1  christos    Keystroke latency distribution (ms),
     47  1.1  christos    
     48  1.1  christos               value  ------------- Distribution ------------- count
     49  1.1  christos                   4 |                                         0
     50  1.1  christos                   8 |                                         1
     51  1.1  christos                  16 |                                         5
     52  1.1  christos                  32 |@@@@@                                    66
     53  1.1  christos                  64 |@@@@@@@@@@@@@@@@@@@@                     247
     54  1.1  christos                 128 |@@@@@@@@@@@@@                            167
     55  1.1  christos                 256 |@                                        16
     56  1.1  christos                 512 |                                         0
     57  1.1  christos 
     58