chromium/third_party/blink/perf_tests/parser/query-selector-all-class.html

<!DOCTYPE html>
<html>
<body>

<div class="foo" bar="baz">
  <div class="foo" bar="baz">
    <div class="foo" bar="baz">
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
      <div class="foo" bar="baz"></div>
    </div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
    <div class="foo" bar="baz"></div>
  </div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
  <div class="foo" bar="baz"></div>
</div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>
<div class="foo" bar="baz"></div>

<script src="../resources/runner.js"></script>
<script>
PerfTestRunner.measureRunsPerSecond({
    description: "This benchmark tests querySelectorAll() on classes",
    run: function() {
        for (var i = 0; i < 1000; i++) {
            document.querySelectorAll(".foo");
            document.querySelectorAll("div.foo");
        }
    }});
</script>
</body>
</html>