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 / x11perfcomp.sh < prev    next >
Text File  |  1989-12-27  |  3KB  |  132 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.13.11;  author joel;  state Exp;
  10. branches ;
  11. next     1.1;
  12.  
  13. 1.1
  14. date     89.10.23.18.52.03;  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. @Removed all references to other scripts except fillblanks.sh
  27. @
  28. text
  29. @#! /bin/sh
  30. # Collects multiple outputs of x11perf.  Just feed it a list of files, each
  31. # containing the output from an x11perf run, and this shell will extract the
  32. # object/second information and show it in tabular form.  An 80-column line is
  33. # big enough to compare 4 different servers.
  34. #
  35. # This script normally uses the results from $1 to extract the test label
  36. # descriptions, so you can run x11perf on a subset of the test and then compare
  37. # the results.  But note that fillblanks.sh requires the labels file to be a
  38. # superset of the x11perf results file.  If you run into an ugly situation in
  39. # which none of the servers completes the desired tests (possible on non-DEC
  40. # servers :), you can use -l <filename> as $1 and $2 to force x11perfcomp to 
  41. # use the labels stored in file $2.  (You can run x11perf with the -labels
  42. # option to generate such a file.)
  43. #
  44. # Mark Moraes, University of Toronto
  45. # Joel McCormack, DEC Western Research Lab
  46.  
  47. set -e
  48. tmp=/tmp/rates.$$
  49. mkdir $tmp $tmp/rates
  50. # Get either the provided label file, or construct one from the first x11perf
  51. # output file given.
  52. case $1 in
  53. -l)    cp $2 $tmp/labels
  54.     shift; shift
  55.     ;;
  56. *)    awk '$2 == "reps" || $2 == "trep" { \
  57.         print $0; \
  58.         next; \
  59.         } \
  60.     ' $1 | sed 's/^.*: //' | uniq > $tmp/labels
  61.     ;;
  62. esac
  63. # Go through all files, and create a corresponding rate file for each
  64. n=1
  65. for i
  66. do
  67. # Get lines with average numbers, fill in any tests that may be missing
  68. # then extract the rate field
  69.     (echo "     $n  "; \
  70.      echo '--------'; \
  71.      awk '$2 == "reps" || $2 == "trep" {
  72.         line = $0;
  73.         next;
  74.         }
  75.         NF == 0 && line != "" {
  76.         print line;
  77.         line="";
  78.         next;
  79.         }
  80.      ' $i > $tmp/$i.avg; \
  81.      fillblanks.sh $tmp/$i.avg $tmp/labels |
  82.      sed 's/( *\([0-9]*\)/(\1/'   |
  83.      awk '$2 == "reps" || $2 == "trep" {
  84.         n = substr($6,2,length($6)-7);
  85.         printf "%8s\n", n;
  86.         }
  87.     ') > $tmp/rates/$i
  88.     echo "$n: $i"
  89.     n=`expr $n + 1`
  90. done
  91. echo ''
  92. (echo Operation; echo '---------'; cat $tmp/labels) | \
  93. (cd $tmp/rates; paste $* -) | \
  94. sed 's/    /  /g'
  95. rm -rf $tmp
  96. @
  97.  
  98.  
  99. 1.1
  100. log
  101. @Initial revision
  102. @
  103. text
  104. @d2 4
  105. a5 2
  106. # Collects multiple outputs of x11perf.  Runs getavg, fillblanks, getrate, on
  107. # each file, and collects the output neatly.
  108. d7 8
  109. a14 3
  110. # Normally uses the results from $1 to extract the test labels, which allows
  111. # comparisons of a subset of x11perf tests.  Using -l <filename> as $1 and $2
  112. # forces x11perfcomp to use the labels stored in $2.
  113. d22 2
  114. d28 5
  115. a32 1
  116. *)    getlabel.sh $1 > $tmp/labels
  117. d35 1
  118. d39 2
  119. d43 17
  120. a59 4
  121.      getavg.sh $i > $tmp/$i.avg; \
  122.      fillblanks.sh $tmp/$i.avg $tmp/labels > $tmp/$i.favg; \
  123.      getrate.sh $tmp/$i.favg) \
  124.         > $tmp/rates/$i
  125. d64 1
  126. a64 1
  127. (echo Operation; echo '---------'; getlabel.sh $1) | \
  128. d66 1
  129. a66 1
  130. sed 's/    /   /g'
  131. @
  132.