home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / x / x11p-13.zip / RCS / fillblanks.sh, < prev    next >
Text File  |  1989-12-27  |  2KB  |  95 lines

  1. head     1.2;
  2. access   ;
  3. symbols  ;
  4. locks    ; strict;
  5. comment  @# @;
  6.  
  7.  
  8. 1.2
  9. date     89.12.27.19.04.28;  author joel;  state Exp;
  10. branches ;
  11. next     1.1;
  12.  
  13. 1.1
  14. date     89.10.23.18.51.01;  author joel;  state Exp;
  15. branches ;
  16. next     ;
  17.  
  18.  
  19. desc
  20. @Shells for comparing x11perf outputs
  21. @
  22.  
  23.  
  24. 1.2
  25. log
  26. @Don't call any other scripts.  Trying to reduce the number of shell scripts
  27. it takes to compare servers.
  28. @
  29. text
  30. @#! /bin/sh
  31. # Some machines weren't able to complete the x11perf tests, or missed
  32. # some tests
  33. # Mark Moraes, University of Toronto
  34. case $# in
  35. 2)    ;;
  36. *)    echo "Usage: $0 getbest_file label_file" >&2
  37.     echo "  will make sure that getbest_file (assumed to be results" >&2
  38.     echo "  of getbest on x11perf raw results) contains one line for" >&2
  39.     echo "  each of the tests in the label file, filling in zeros for" >&2
  40.     echo "  missing lines, so mungeall may be used for comparison" >&2
  41.     echo "  of even incomplete runs of x11perf. label_file may be" >&2
  42.     echo "  obtained by running getlabel on any complete x11perf" >&2
  43.     echo "  getbest results." >&2
  44.     exit 1
  45.     ;;
  46. esac
  47. f=$1
  48. label=$2
  49. awk '$2 == "reps" || $2 == "trep" {
  50.     print $0;
  51.     next;
  52.     }
  53. ' $f | sed 's/^.*: //' | uniq > /tmp/f1.$$
  54. diff -e /tmp/f1.$$ $label > /tmp/f2.$$
  55. others=`sed -n -e ':start' \
  56.     -e '/^[0-9]*,[0-9]*d$/b pnext' \
  57.     -e '/^[0-9]*[ac]$/b skpdot' \
  58.     -e '/^[0-9]*,[0-9]*c$/b skpdot' \
  59.     -e x -e 's/.*/bad pattern in diff output/' -e p -e n -e 'b start' \
  60.     -e :skpdot -e p -e :skip -e n -e '/^\.$/b next' -e 'b skip' \
  61.     -e :pnext -e p -e :next -e n -e 'b start' \
  62. /tmp/f2.$$ | grep -v '^[0-9]*a'`
  63. case "$others" in
  64. '')    ;;
  65. *)    echo "$0: label file $label is incomplete or out of date," >& 2
  66.     echo "   or you are trying to use old (pre-1.2) x11perf results." >& 2
  67.     exit 1
  68.     ;;
  69. esac
  70. (sed     -e :start -e '/^[0-9]*[ac]$/b skpdot' \
  71.     -e :skpdot -e :skip -e n -e '/^\.$/b next' \
  72.         -e 's,.*,     0 reps @@  0.0    msec (0.0/sec): &,' \
  73.         -e 'b skip' \
  74.     -e :next -e n -e 'b start' \
  75.     /tmp/f2.$$; echo '1,$p') | ed - $f > /tmp/f1.$$
  76. cat /tmp/f1.$$
  77. rm -f /tmp/f1.$$ /tmp/f2.$$
  78. @
  79.  
  80.  
  81. 1.1
  82. log
  83. @Initial revision
  84. @
  85. text
  86. @d20 5
  87. a24 1
  88. getlabel.sh $f > /tmp/f1.$$
  89. d37 1
  90. a37 1
  91.     echo "   or you are trying to use old (pre-1.1) x11perf results." >& 2
  92. a47 1
  93. #mv /tmp/f1.$$ $f
  94. @
  95.