home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Add-Ons / MPW / MPW noweb 2.7 / examples / graphs.nw < prev    next >
Encoding:
Text File  |  1995-05-30  |  8.1 KB  |  245 lines  |  [TEXT/MPS ]

  1. This is a noweb file for doing all the graphs in the paper.  It sets 
  2. up generic chunks for setting up the axis sizes, etc, and gets all of 
  3. the graph's data from data.nw.  
  4.  
  5. @ This first chunk is to be used by all graphs.  It sets up the axis
  6. sizes, as well as the font sizes for labels.
  7. <<Standard Defaults>>=
  8.   yaxis size 1.9  hash_labels fontsize 7 label fontsize 8 draw
  9.   xaxis size 2.14 hash_labels fontsize 7 label fontsize 8 draw
  10.   title fontsize 10
  11. The following chunks define the curves for the four different 
  12. types of checkpointing algorithms.  
  13. <<Sequential Curve>>=
  14.   newcurve marktype circle  fill 1 linetype solid
  15. <<Concurrent Curve>>=
  16.   newcurve marktype diamond fill 0 linetype solid
  17. <<Low Latency Curve>>=
  18.   newcurve marktype box     fill 1 linetype solid
  19. <<Low Latency Large Curve>>=
  20.   newcurve marktype box     fill 0 linetype solid
  21. Finally, this chunk is for the split legends of graphs 1-4.
  22. <<Legend>>=
  23. newgraph
  24.   inherit_axes
  25.   xaxis min 0 max 10 nodraw
  26.   yaxis min 0 max 10 nodraw
  27.   <<Sequential Curve>> label fontsize 7 : Sequential
  28.   <<Concurrent Curve>> label fontsize 7 : Concurrent
  29.   legend x 0 y 11.5
  30. newgraph
  31.   inherit_axes
  32.   <<Low Latency Curve>>       label fontsize 7 : Low Latency, Conc.
  33.   <<Low Latency Large Curve>> label fontsize 7 : Low Lat., Conc., Large
  34.   legend x 4.7 y 11.5
  35. ----  THE GRAPHS ----
  36. GRAPHS 1 \& 2
  37. <<Graphs 1n2>>=
  38. Y 3
  39. newgraph              x_translate -1.37 
  40.   <<Graph 1>>
  41. newgraph inherit_axes x_translate  1.7  
  42.   <<Graph 2>>
  43. Graph \#1: Checkpoint time.  This is the wall-clock time to take one
  44. checkpoint of a merge-sort program.
  45. <<Graph 1>>=
  46.   <<Standard Defaults>>
  47.   title : Graph 1: Checkpoint Time.
  48.   xaxis min 0 max 10 hash 2  mhash 1 label : Heap Size (MBytes)
  49.   yaxis min 0 max 70 hash 10 mhash 1 label : Time (sec)
  50.   <<Sequential Curve>>
  51.     pts shell : notangle -R"Ckp Time" data.nw | head -6 | awk '{print $1" "$2}'
  52.   <<Concurrent Curve>>
  53.     pts shell : notangle -R"Ckp Time" data.nw | head -6 | awk '{print $1" "$3}'
  54.   <<Low Latency Curve>>
  55.     pts shell : notangle -R"Ckp Time" data.nw | head -6 | awk '{print $1" "$4}'
  56.   <<Low Latency Large Curve>>
  57.     pts shell : notangle -R"Ckp Time" data.nw | head -6 | awk '{print $1" "$5}'
  58.   <<Legend>>
  59.  
  60. Graph \#2: Checkpoint overhead.  This is the extra time that it took
  61. the program to complete after taking one checkpoint.
  62. <<Graph 2>>=
  63.   <<Standard Defaults>>
  64.   title : Graph 2: Checkpoint Overhead.
  65.   xaxis min 0 max 10 hash 2  mhash 1 label : Heap Size (MBytes)
  66.   yaxis min 0 max 35 hash 10 mhash 1 label : Time (sec)
  67.   <<Sequential Curve>>
  68.     pts shell : notangle -R"Overhead" data.nw | awk '{print $1" "$2}'
  69.   <<Concurrent Curve>>
  70.     pts shell : notangle -R"Overhead" data.nw | awk '{print $1" "$3}'
  71.   <<Low Latency Curve>>
  72.     pts shell : notangle -R"Overhead" data.nw | awk '{print $1" "$4}'
  73.   <<Low Latency Large Curve>>
  74.     pts shell : notangle -R"Overhead" data.nw | awk '{print $1" "$5}'
  75.   <<Legend>>
  76. GRAPHS 3 \& 4
  77. <<Graphs 3n4>>=
  78.   Y 3
  79.   newgraph              x_translate -1.37 
  80.     <<Graph 3>>
  81.   newgraph inherit_axes x_translate  1.7  
  82.     <<Graph 4>>
  83. Graph \#3: Checkpoint Overhead Percentage.  This is the percentage
  84. of the checkpointing time which is overhead incurred on the target
  85. program
  86. <<Graph 3>>=
  87.   <<Standard Defaults>>
  88.   title : Graph 3: Checkpoint Overhead Percentage
  89.   xaxis min 0 max 10 hash 2  mhash 1  label : Heap Size (MBytes)
  90.   yaxis min 0 max 100 hash 10 mhash 1 label : % Overhead
  91.   <<Sequential Curve>>
  92.     pts shell : notangle -R"Ckp %age" data.nw | awk '{print $1" "$2}'
  93.   <<Concurrent Curve>>
  94.     pts shell : notangle -R"Ckp %age" data.nw | awk '{print $1" "$3}'
  95.   <<Low Latency Curve>>
  96.     pts shell : notangle -R"Ckp %age" data.nw | awk '{print $1" "$4}'
  97.   <<Low Latency Large Curve>>
  98.     pts shell : notangle -R"Ckp %age" data.nw | awk '{print $1" "$5}'
  99.   <<Legend>>
  100. Graph \#4:  This displays what happens when the heaps get big
  101. <<Graph 4>>=
  102.   <<Standard Defaults>>
  103.   title : Graph 4: Checkpoint Time for Large Heaps.
  104.   xaxis min 0 max 13  hash 2   mhash 1 label : Heap Size (MBytes)
  105.   yaxis min 0 max 700 hash 100 mhash 1 label : Time (sec)
  106.   <<Sequential Curve>>
  107.     pts shell : notangle -R"Ckp Time" data.nw | awk '{print $1" "$2}'
  108.   <<Concurrent Curve>>
  109.     pts shell : notangle -R"Ckp Time" data.nw | awk '{print $1" "$3}'
  110.   <<Low Latency Curve>>
  111.     pts shell : notangle -R"Ckp Time" data.nw | awk '{print $1" "$4}'
  112.   <<Low Latency Large Curve>>
  113.     pts shell : notangle -R"Ckp Time" data.nw | awk '{print $1" "$5}'
  114.   <<Legend>>
  115. Graph \#5: Latency Data
  116. <<Graph 5>>=
  117.   Y 3
  118.   newgraph
  119.   <<Standard Defaults>>
  120.   title : Graph 5: Latency Data.
  121.   xaxis min 0 max 13  hash 2   mhash 1 label : Heap Size (MBytes)
  122.   yaxis min 0 max .351 hash .1 mhash 1 label : Time(sec)
  123.   newcurve marktype circle fill 1 linetype solid
  124.     pts shell : notangle -R"Latency" data.nw | awk '{print $1" "$2}'
  125.     label : Initial Stop Time
  126.   newcurve marktype circle fill 0 linetype solid
  127.     pts shell : notangle -R"Latency" data.nw | awk '{print $1" "$3}'
  128.     label : Maximum Trap Time
  129.   legend right
  130. GRAPHS 6 \& 7
  131. <<Graphs 6n7>>=
  132.   Y 3
  133.   newgraph              x_translate -1.37 
  134.     <<Graph 6>>
  135.   newgraph inherit_axes x_translate  1.7  
  136.     <<Graph 7>>
  137. Graph \#6: Number of traps vs Segment Size
  138. <<Graph 6>>=
  139.   <<Standard Defaults>>
  140.   title : Graph 6: Number of Traps vs. Segment Size.
  141.   xaxis min 0 max 128  hash 32  mhash 1 label : Segment Size (KBytes)
  142.   yaxis min 0 max 1000 hash 200 mhash 1 label : Number of Traps
  143.   newcurve marktype circle fill 1 linetype solid
  144.     pts shell : notangle -R"Num Traps" data.nw
  145. Graph \#7: Number of traps vs Segment Size
  146. <<Graph 7>>=
  147.   <<Standard Defaults>>
  148.   title : Graph 7: Maximum Trap Time vs. Segment Size.
  149.   xaxis min 0 max 128 hash 32 mhash 1 label : Segment Size (KBytes)
  150.   yaxis min 0 max 1.4 hash .2 mhash 1 label : Maximum Trap Time (Sec)
  151.   newcurve marktype circle fill 1 linetype solid
  152.     pts shell : notangle -R"Trap Time" data.nw
  153. Graph \#8: Frequency of Traps
  154. <<Graph 8>>=
  155.   Y 3
  156.   newgraph
  157.   <<Standard Defaults>>
  158.   title : Graph \#8: Frequency of Traps.
  159.   xaxis min 0 max 2.6001 hash .5 mhash 4 
  160.     label : Starting Time of 0.1 second interval (sec)
  161.   yaxis min 0 max 10 hash 1 mhash 0
  162.     label : Traps per 0.1 second Interval
  163.   newcurve marktype circle fill 0 pts 
  164.   shell : notangle -R"Freq" data.nw 
  165.   newstring hjr vjc fontsize 7 x 2.6 y 10 : Average Trap Time = 0.015 seconds 
  166. GRAPHS 9 \& 10
  167. <<Graphs 9n10>>=
  168.   Y 3
  169.   newgraph              x_translate -1.37 
  170.     <<Graph 9>>
  171.   newgraph inherit_axes x_translate  1.7  
  172.     <<Graph 10>>
  173. Graph 9 \& 10 have bizarre legends as well:
  174. <<Merge>>=
  175.   newcurve marktype circle   fill 0 linetype solid
  176. <<Trs>>=
  177.   newcurve marktype triangle fill 0 linetype none
  178. <<Pattern>>=
  179.   newcurve marktype diamond  fill 1 linetype none
  180. <<Bubble>>=
  181.   newcurve marktype cross    fill 1 linetype none
  182. <<Matrix>>=
  183.   newcurve marktype box      fill 1 linetype none
  184. <<9n10 Legend>>=
  185.   newgraph inherit_axes
  186.     xaxis min 0 max 10 nodraw
  187.     yaxis min 0 max 10 nodraw
  188.     <<Merge>> 
  189.       label fontsize 7 : Merge Sort
  190.     <<Trs>> 
  191.       label fontsize 7 : Travelling Salesman
  192.     <<Pattern>> 
  193.       label fontsize 7 : Pattern Match
  194.     legend x 0 y 12
  195.   newgraph inherit_axes
  196.     <<Bubble>>
  197.       label fontsize 7 : Bubble Sort
  198.     <<Matrix>>
  199.       label fontsize 7 : Matrix Multiplication
  200.     legend x 5.6 y 12
  201. Graph \#9: 
  202. <<Graph 9>>=
  203.   <<Standard Defaults>>
  204.   title : Graph 9: Checkpoint Time of Other Benchmarks.
  205.   xaxis min 0 max 10 hash 2  mhash 1 label : Heap Size (MBytes)
  206.   yaxis min 0 max 40 hash 10 mhash 1 label : Time (sec)
  207.   <<Merge>>
  208.     pts shell : notangle -R"Ckp Time" data.nw | head -6 | awk '{print $1" "$4}'
  209.   <<Trs>>     pts  .064  2.359
  210.   <<Pattern>> pts 1.233  6.374
  211.   <<Bubble>>  pts  .513  3.91
  212.   <<Matrix>>  pts 3.000 14.71
  213.   <<9n10 Legend>>
  214. Graph \#10: 
  215. <<Graph 10>>=
  216.   <<Standard Defaults>>
  217.   title : Graph 10: Checkpoint Overhead of Other Benchmarks.
  218.   xaxis min 0 max 10 hash 2  mhash 1 label : Heap Size (MBytes)
  219.   yaxis min 0 max 5  hash 1  mhash 1 label : Time (sec)
  220.   <<Merge>>
  221.     pts shell : notangle -R"Overhead" data.nw | awk '{print $1" "$4}'
  222.   <<Trs>>     pts  .064  0.17
  223.   <<Pattern>> pts 1.233  0.07
  224.   <<Bubble>>  pts  .513  0.07
  225.   <<Matrix>>  pts 3.000  0.75
  226.   <<9n10 Legend>>
  227.