html-list 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # Take the list of files and turn them into an html file that points
  2. # at their context & mem latency GIFs.
  3. #
  4. # Usage: html-list file file file....
  5. #
  6. # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com).
  7. # Copyright (c) 1995 Larry McVoy. GPLed software.
  8. # $Id$
  9. eval 'exec perl -Ssw $0 "$@"'
  10. if 0;
  11. open(H, ">HTML/specific.html");
  12. print H <<EOF;
  13. <title>LMBENCH System Results</title>
  14. <h1>LMBENCH System Results</h1>
  15. <h2><a href=summary>Summary of results</a></h2>
  16. <hr>
  17. EOF
  18. # The order that is passed in is the order of the generated
  19. # graphs so save that.
  20. $val = 0;
  21. foreach $file (@ARGV) {
  22. $number{$file} = ++$val;
  23. }
  24. # Now sort them so we can group by OS
  25. @ARGV = sort(@ARGV);
  26. # Figure out the different OS
  27. foreach $file (@ARGV) {
  28. ($os = $file) =~ s|/.*||;
  29. push(@os, $os);
  30. $done{$os} = 0;
  31. }
  32. foreach $os (@os) {
  33. next if $done{$os};
  34. $done{$os} = 1;
  35. # Print out an OS specific heading
  36. print H "<hr><h2>Results from $os</h2><p>\n";
  37. for ($i = 0; $i <= $#os; $i++) {
  38. $file = $ARGV[$i];
  39. next unless $file =~ /$os/;
  40. open(F, $file);
  41. $_ = <F>;
  42. close(F);
  43. next unless /lmbench1.[01]/;
  44. chop;
  45. $title = $_;
  46. #s/.lmbench1.? results for //;
  47. ($sys = $file) =~ s|.*/||;
  48. if ($i > 0) {
  49. ($prev_sys = $ARGV[$i - 1]) =~ s|.*/||;
  50. }
  51. if ($i < $#os) {
  52. ($next_sys = $ARGV[$i + 1]) =~ s|.*/||;
  53. }
  54. print H <<EOF;
  55. <h3>Dataset: $sys</h3>
  56. <h4>$title</h4>
  57. <a href="${sys}-ctx.html">Context switch details</a>,
  58. <a href="${sys}-bwmem.html">memory bandwidths</a>,
  59. <a href="${sys}-bwfile.html">file reread vs. memory bandwidths</a>,
  60. and
  61. <a href="${sys}-mem.html">memory latencies</a>.
  62. EOF
  63. # Create the files referencing the data GIFs
  64. $N = sprintf("%02d", $number{$file});
  65. $prev = $next = "";
  66. %label = ('ctx', 'context switching',
  67. 'mem', 'memory latency',
  68. 'bwmem', 'memory bandwidth',
  69. 'bwfile', 'file reread bandwidth');
  70. %doc = ('ctx', 'lat_ctx.8.html',
  71. 'mem', 'lat_mem_rd.8.html',
  72. 'bwmem', 'bw_mem.8.html',
  73. 'bwfile', 'bw_file_rd.8.html');
  74. $back = "<img align=middle src=\"../gifs/arrows/back.gif\">";
  75. $forward = "<img align=middle src=\"../gifs/arrows/forward.gif\">";
  76. for $what ('ctx', 'mem', 'bwmem', 'bwfile') {
  77. for $scale ('', '-unscaled') {
  78. open(S, ">HTML/${sys}-${what}${scale}.html");
  79. if ($scale eq '') {
  80. $notscale = "-unscaled";
  81. $lab = "";
  82. $Lab = "Unscaled ";
  83. } else {
  84. $notscale = "";
  85. $lab = "scaled ";
  86. $Lab = "Scaled ";
  87. }
  88. $prev =
  89. "<a href=${prev_sys}-${what}${scale}.html>
  90. Previous ${lab}$label{$what} result</a><p>"
  91. if $i > 0;
  92. $next =
  93. "<a href=${next_sys}-${what}.html>
  94. Next ${lab}$label{$what} result</a><p>"
  95. if $i < $#os;
  96. print S<<EOF;
  97. <h4>$title</h4>
  98. <a href=../$doc{$what}>Information on this benchmark</a> (Not up to date)
  99. <p><IMG SRC="${what}${scale}$N.gif">\n<p>
  100. <a href=../lmbench.html>
  101. <img align=middle src="../gifs/arrows/b_arrow.gif">LMBENCH table of contents</a>
  102. <a href=specific.html>
  103. <img align=middle src=\"../gifs/graph.gif\">System results table of contents</a>
  104. <p>
  105. $next
  106. $prev
  107. <a href=${sys}-${what}${notscale}.html>
  108. ${Lab}$label{$what} results for this system</a>
  109. EOF
  110. }
  111. }
  112. }
  113. }
  114. exit 0;