v8/test/js-perf-test/Intl/run.js
Frank Tang 151a0afb34 [Intl] Add perf test for Intl constructors
Just add tests so we can observe the number first.

Got the following results
$ python -u tools/run_perf.py --binary-override-path   out/x64.release/d8 --filter "JSTests/Intl"   test/js-perf-test/JSTests.json
INFO      >>> Running suite: JSTests/Intl
INFO      >>> Stdout (#1):
NewIntlCollator-Intl(Score): 161
NewIntlDateTimeFormat-Intl(Score): 9.73
NewIntlNumberFormat-Intl(Score): 18.6
NewIntlPluralRules-Intl(Score): 18.5
NewIntlListFormat-Intl(Score): 19.4
NewIntlRelativeTimeFormat-Intl(Score): 18.7

Bug: chromium:928098
Change-Id: I59f28393af8f868de639dcb81a7b2f69ce2f0eba
Reviewed-on: https://chromium-review.googlesource.com/c/1455717
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59424}
2019-02-07 01:08:12 +00:00

20 lines
572 B
JavaScript

// Copyright 2019 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
load('../base.js');
load('constructor.js');
function PrintResult(name, result) {
console.log(name + '-Intl(Score): ' + result);
}
function PrintError(name, error) {
PrintResult(name, error);
}
BenchmarkSuite.config.doWarmup = undefined;
BenchmarkSuite.config.doDeterministic = undefined;
BenchmarkSuite.RunSuites({ NotifyResult: PrintResult,
NotifyError: PrintError });