topical media & game development

talk show tell print

mobile-query-three-bench-benchmark.js-tests-benchmark.air-src-index.htm / htm



  <!doctype html>
  <html>
  <head>
  <meta charset="utf-8">
  <title>Benchmark.js Adobe AIR Test Suite</title>
  <script src="AIRIntrospector.js"></script>
  <script>
  var console = air.Introspector.Console;
  </script>
  <script src="benchmark.js"></script>
  </head>
  <body>
  <script>
  (function() {
  
    var suite = new Benchmark.Suite;
  
    // add tests
    suite.add('RegExp#test', function() {
      /o/.test('Hello World!');
    })
    .add('String#indexOf', function() {
      'Hello World!'.indexOf('o') > -1;
    })
    // add listeners
    .on('cycle', function(event, bench) {
      console.log(bench);
    })
    .on('complete', function() {
      console.log('Fastest is ' + this.filter('fastest').pluck('name'));
    })
    // don't run async to avoid JavaScript security errors
    // http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7f0e.html
    .run({ 'async': false });
  
  }());
  </script>
  </body>
  </html>


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.