|
Packit |
f0b94e |
// Copyright 2014 the V8 project authors. All rights reserved.
|
|
Packit |
f0b94e |
// Redistribution and use in source and binary forms, with or without
|
|
Packit |
f0b94e |
// modification, are permitted provided that the following conditions are
|
|
Packit |
f0b94e |
// met:
|
|
Packit |
f0b94e |
//
|
|
Packit |
f0b94e |
// * Redistributions of source code must retain the above copyright
|
|
Packit |
f0b94e |
// notice, this list of conditions and the following disclaimer.
|
|
Packit |
f0b94e |
// * Redistributions in binary form must reproduce the above
|
|
Packit |
f0b94e |
// copyright notice, this list of conditions and the following
|
|
Packit |
f0b94e |
// disclaimer in the documentation and/or other materials provided
|
|
Packit |
f0b94e |
// with the distribution.
|
|
Packit |
f0b94e |
// * Neither the name of Google Inc. nor the names of its
|
|
Packit |
f0b94e |
// contributors may be used to endorse or promote products derived
|
|
Packit |
f0b94e |
// from this software without specific prior written permission.
|
|
Packit |
f0b94e |
//
|
|
Packit |
f0b94e |
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
Packit |
f0b94e |
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
Packit |
f0b94e |
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
Packit |
f0b94e |
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
Packit |
f0b94e |
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
Packit |
f0b94e |
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
Packit |
f0b94e |
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
Packit |
f0b94e |
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
Packit |
f0b94e |
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
Packit |
f0b94e |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Packit |
f0b94e |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
var base_dir = '';
|
|
Packit |
f0b94e |
load(base_dir + 'base.js');
|
|
Packit |
f0b94e |
load(base_dir + 'pdfjs.js');
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
var success = true;
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
function PrintResult(name, result) {
|
|
Packit |
f0b94e |
print(name + ': ' + result);
|
|
Packit |
f0b94e |
}
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
function PrintError(name, error) {
|
|
Packit |
f0b94e |
PrintResult(name, error);
|
|
Packit |
f0b94e |
success = false;
|
|
Packit |
f0b94e |
}
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
function PrintScore(score) {
|
|
Packit |
f0b94e |
if (success) {
|
|
Packit |
f0b94e |
print('----');
|
|
Packit |
f0b94e |
print('Score (version ' + BenchmarkSuite.version + '): ' + score);
|
|
Packit |
f0b94e |
}
|
|
Packit |
f0b94e |
}
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
BenchmarkSuite.config.doWarmup = undefined;
|
|
Packit |
f0b94e |
BenchmarkSuite.config.doDeterministic = undefined;
|
|
Packit |
f0b94e |
|
|
Packit |
f0b94e |
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
|
|
Packit |
f0b94e |
NotifyError: PrintError,
|
|
Packit |
f0b94e |
NotifyScore: PrintScore });
|