Author: [email protected]
Date: Wed Jul 15 01:46:32 2009
New Revision: 2464

Modified:
    data/benchmarks/v2/run.html
    data/benchmarks/v2/style.css
    data/benchmarks/v3/run.html
    data/benchmarks/v3/style.css
    data/benchmarks/v4/run.html
    data/benchmarks/v4/style.css

Log:
Second of three CLs now changing v2, v3 and v4 of the benchmark suite
so that a warning is issued whenever the version run is not the latest
Review URL: http://codereview.chromium.org/149610

Modified: data/benchmarks/v2/run.html
==============================================================================
--- data/benchmarks/v2/run.html (original)
+++ data/benchmarks/v2/run.html Wed Jul 15 01:46:32 2009
@@ -48,9 +48,35 @@
                               NotifyScore: AddScore });
  }

+function ShowWarningIfObsolete() {
+  // If anything goes wrong we will just catch the exception and no
+  // warning is shown, i.e., no harm is done.
+  try {
+    var xmlhttp;
+    var next_version = parseInt(BenchmarkSuite.version) + 1;
+    var next_version_url = "../v" + next_version + "/run.html";
+    if (window.XMLHttpRequest) {
+      xmlhttp = new window.XMLHttpRequest();
+    } else if (window.ActiveXObject) {
+      xmlhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
+    }
+    xmlhttp.open('GET', next_version_url, true);
+    xmlhttp.onreadystatechange = function() {
+      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+        document.getElementById('obsolete').style.display="block";
+      }
+    };
+    xmlhttp.send(null);
+  } catch(e) {
+    // Ignore exception if check for next version fails.
+    // Hence no warning is displayed.
+  }
+}
+
  function Load() {
    var version = BenchmarkSuite.version;
    document.getElementById("version").innerHTML = version;
+  ShowWarningIfObsolete();
    window.setTimeout(Run, 200);
  }
  </script>
@@ -58,6 +84,12 @@
  <body onLoad="Load()">
  <div>
    <div class="title"><h1>V8 Benchmark Suite - version <span  
id="version">?</span></h1></div>
+  <div class="warning" id="obsolete">
+Warning! This is not the latest version of V8 benchmark
+suite. Consider running the
+<a href="http://v8.googlecode.com/svn/data/benchmarks/current/run.html";>
+latest version</a>.
+  </div>
    <table>
      <tr>
        <td class="contents">

Modified: data/benchmarks/v2/style.css
==============================================================================
--- data/benchmarks/v2/style.css        (original)
+++ data/benchmarks/v2/style.css        Wed Jul 15 01:46:32 2009
@@ -68,3 +68,12 @@
    background-repeat: no-repeat;
    border: 1px solid rgb(51, 102, 204);
  }
+
+div.warning {
+  background: #ffffd9;
+  border: 1px solid #d2d26a;
+  display: none;
+  margin: 1em 0 2em;
+  padding: 8px;
+  text-align: center;
+}

Modified: data/benchmarks/v3/run.html
==============================================================================
--- data/benchmarks/v3/run.html (original)
+++ data/benchmarks/v3/run.html Wed Jul 15 01:46:32 2009
@@ -49,9 +49,35 @@
                               NotifyScore: AddScore });
  }

+function ShowWarningIfObsolete() {
+  // If anything goes wrong we will just catch the exception and no
+  // warning is shown, i.e., no harm is done.
+  try {
+    var xmlhttp;
+    var next_version = parseInt(BenchmarkSuite.version) + 1;
+    var next_version_url = "../v" + next_version + "/run.html";
+    if (window.XMLHttpRequest) {
+      xmlhttp = new window.XMLHttpRequest();
+    } else if (window.ActiveXObject) {
+      xmlhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
+    }
+    xmlhttp.open('GET', next_version_url, true);
+    xmlhttp.onreadystatechange = function() {
+      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+        document.getElementById('obsolete').style.display="block";
+      }
+    };
+    xmlhttp.send(null);
+  } catch(e) {
+    // Ignore exception if check for next version fails.
+    // Hence no warning is displayed.
+  }
+}
+
  function Load() {
    var version = BenchmarkSuite.version;
    document.getElementById("version").innerHTML = version;
+  ShowWarningIfObsolete();
    window.setTimeout(Run, 200);
  }
  </script>
@@ -59,6 +85,12 @@
  <body onLoad="Load()">
  <div>
    <div class="title"><h1>V8 Benchmark Suite - version <span  
id="version">?</span></h1></div>
+  <div class="warning" id="obsolete">
+Warning! This is not the latest version of V8 benchmark
+suite. Consider running the
+<a href="http://v8.googlecode.com/svn/data/benchmarks/current/run.html";>
+latest version</a>.
+  </div>
    <table>
      <tr>
        <td class="contents">

Modified: data/benchmarks/v3/style.css
==============================================================================
--- data/benchmarks/v3/style.css        (original)
+++ data/benchmarks/v3/style.css        Wed Jul 15 01:46:32 2009
@@ -68,3 +68,12 @@
    background-repeat: no-repeat;
    border: 1px solid rgb(51, 102, 204);
  }
+
+div.warning {
+  background: #ffffd9;
+  border: 1px solid #d2d26a;
+  display: none;
+  margin: 1em 0 2em;
+  padding: 8px;
+  text-align: center;
+}

Modified: data/benchmarks/v4/run.html
==============================================================================
--- data/benchmarks/v4/run.html (original)
+++ data/benchmarks/v4/run.html Wed Jul 15 01:46:32 2009
@@ -50,9 +50,35 @@
                               NotifyScore: AddScore });
  }

+function ShowWarningIfObsolete() {
+  // If anything goes wrong we will just catch the exception and no
+  // warning is shown, i.e., no harm is done.
+  try {
+    var xmlhttp;
+    var next_version = parseInt(BenchmarkSuite.version) + 1;
+    var next_version_url = "../v" + next_version + "/run.html";
+    if (window.XMLHttpRequest) {
+      xmlhttp = new window.XMLHttpRequest();
+    } else if (window.ActiveXObject) {
+      xmlhttp = new window.ActiveXObject("Microsoft.XMLHTTP");
+    }
+    xmlhttp.open('GET', next_version_url, true);
+    xmlhttp.onreadystatechange = function() {
+      if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+        document.getElementById('obsolete').style.display="block";
+      }
+    };
+    xmlhttp.send(null);
+  } catch(e) {
+    // Ignore exception if check for next version fails.
+    // Hence no warning is displayed.
+  }
+}
+
  function Load() {
    var version = BenchmarkSuite.version;
    document.getElementById("version").innerHTML = version;
+  ShowWarningIfObsolete();
    window.setTimeout(Run, 200);
  }
  </script>
@@ -60,6 +86,12 @@
  <body onLoad="Load()">
  <div>
    <div class="title"><h1>V8 Benchmark Suite - version <span  
id="version">?</span></h1></div>
+  <div class="warning" id="obsolete">
+Warning! This is not the latest version of V8 benchmark
+suite. Consider running the
+<a href="http://v8.googlecode.com/svn/data/benchmarks/current/run.html";>
+latest version</a>.
+  </div>
    <table>
      <tr>
        <td class="contents">

Modified: data/benchmarks/v4/style.css
==============================================================================
--- data/benchmarks/v4/style.css        (original)
+++ data/benchmarks/v4/style.css        Wed Jul 15 01:46:32 2009
@@ -68,3 +68,12 @@
    background-repeat: no-repeat;
    border: 1px solid rgb(51, 102, 204);
  }
+
+div.warning {
+  background: #ffffd9;
+  border: 1px solid #d2d26a;
+  display: none;
+  margin: 1em 0 2em;
+  padding: 8px;
+  text-align: center;
+}

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to