Reviewers: Benedikt Meurer,
Message:
PTAL. I'd probably add one more level of hierarchy to the benchmark runner
before landing this.
https://codereview.chromium.org/503643002/diff/1/test/perf-tests/infra-test.cc
File test/perf-tests/infra-test.cc (right):
https://codereview.chromium.org/503643002/diff/1/test/perf-tests/infra-test.cc#newcode11
test/perf-tests/infra-test.cc:11: printf("Trace(Constant), Result(10.0),
StdDev(1.0)\n");
I think it might be useful to have one level of hierarchy more here and
return:
Graph(Infra), Trace(Constant), Result(10.0), StdDev(1.0)
And teach the benchmark driver to group these graphs and traces.
Description:
Add performance test skeleton.
BUG=406405
LOG=n
TEST=tools/run_benchmarks.py --arch=ia32 test/perf-tests/perf-tests.json
TEST=tools/run-tests.py --mode=release --arch=ia32 --nopresubmit perf-tests
--no-variants
Please review this at https://codereview.chromium.org/503643002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+29, -15 lines):
M build/all.gyp
A + test/perf-tests/DEPS
A test/perf-tests/infra-test.cc
A + test/perf-tests/perf-tests.gyp
A test/perf-tests/perf-tests.json
A + test/perf-tests/perf-tests.status
A + test/perf-tests/testcfg.py
Index: build/all.gyp
diff --git a/build/all.gyp b/build/all.gyp
index
29fcb177f6a2bec49fc0f69da57c617f8be356b4..4dd57f5e32bf1296c689db8f1bb1f9828addda2b
100644
--- a/build/all.gyp
+++ b/build/all.gyp
@@ -14,6 +14,7 @@
'../test/cctest/cctest.gyp:*',
'../test/compiler-unittests/compiler-unittests.gyp:*',
'../test/heap-unittests/heap-unittests.gyp:*',
+ '../test/perf-tests/perf-tests.gyp:*',
'../test/runtime-unittests/runtime-unittests.gyp:*',
],
'conditions': [
Index: test/perf-tests/DEPS
diff --git a/test/base-unittests/DEPS b/test/perf-tests/DEPS
similarity index 59%
copy from test/base-unittests/DEPS
copy to test/perf-tests/DEPS
index
5c0cadf9f1ccaf25cff4eba6e8344b215082fca6..e49cf1622a8648455bd7be921cfcece4cd6b215d
100644
--- a/test/base-unittests/DEPS
+++ b/test/perf-tests/DEPS
@@ -1,9 +1,6 @@
include_rules = [
"-include",
- "+include/v8config.h",
- "+include/v8stdint.h",
"-src",
- "+src/base",
"+testing/gtest",
"+testing/gtest-support.h",
]
Index: test/perf-tests/infra-test.cc
diff --git a/test/perf-tests/infra-test.cc b/test/perf-tests/infra-test.cc
new file mode 100644
index
0000000000000000000000000000000000000000..27bc2879e78505060a0689ffa77d02b0f50eafcd
--- /dev/null
+++ b/test/perf-tests/infra-test.cc
@@ -0,0 +1,15 @@
+// Copyright 2014 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.
+
+#include "testing/gtest-support.h"
+
+namespace v8 {
+namespace infra {
+
+TEST(InfraTest, Constant) {
+ printf("Trace(Constant), Result(10.0), StdDev(1.0)\n");
+}
+
+} // namespace infra
+} // namespace v8
Index: test/perf-tests/perf-tests.gyp
diff --git a/test/base-unittests/base-unittests.gyp
b/test/perf-tests/perf-tests.gyp
similarity index 71%
copy from test/base-unittests/base-unittests.gyp
copy to test/perf-tests/perf-tests.gyp
index
6b69f1c9842e5811448b8eeb80fb8144deb0f233..5cc5f7da312aba51741fa55d98a1e9b4ef4808ae
100644
--- a/test/base-unittests/base-unittests.gyp
+++ b/test/perf-tests/perf-tests.gyp
@@ -9,7 +9,7 @@
'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'targets': [
{
- 'target_name': 'base-unittests',
+ 'target_name': 'perf-tests',
'type': 'executable',
'dependencies': [
'../../testing/gtest.gyp:gtest',
@@ -20,14 +20,7 @@
'../..',
],
'sources': [ ### gcmole(all) ###
- 'bits-unittest.cc',
- 'cpu-unittest.cc',
- 'platform/condition-variable-unittest.cc',
- 'platform/mutex-unittest.cc',
- 'platform/platform-unittest.cc',
- 'platform/semaphore-unittest.cc',
- 'platform/time-unittest.cc',
- 'utils/random-number-generator-unittest.cc',
+ 'infra-test.cc',
],
'conditions': [
['os_posix == 1', {
Index: test/perf-tests/perf-tests.json
diff --git a/test/perf-tests/perf-tests.json
b/test/perf-tests/perf-tests.json
new file mode 100644
index
0000000000000000000000000000000000000000..e50672bba637f292f05c6890160d8c3b0ee2bce4
--- /dev/null
+++ b/test/perf-tests/perf-tests.json
@@ -0,0 +1,8 @@
+{
+ "name": "Perf-Tests",
+ "binary": "perf-tests",
+ "path": ["."],
+ "run_count": 1,
+ "generic": true,
+ "unit": "ms"
+}
Index: test/perf-tests/perf-tests.status
diff --git a/test/runtime-unittests/runtime-unittests.status
b/test/perf-tests/perf-tests.status
similarity index 100%
copy from test/runtime-unittests/runtime-unittests.status
copy to test/perf-tests/perf-tests.status
Index: test/perf-tests/testcfg.py
diff --git a/test/heap-unittests/testcfg.py b/test/perf-tests/testcfg.py
similarity index 89%
copy from test/heap-unittests/testcfg.py
copy to test/perf-tests/testcfg.py
index
ffa4b59de5bf792decbdb2fd5178486b26e28614..a30bf5188a95ee6d0e88d4471951651a99d9f264
100644
--- a/test/heap-unittests/testcfg.py
+++ b/test/perf-tests/testcfg.py
@@ -11,9 +11,9 @@ from testrunner.local import utils
from testrunner.objects import testcase
-class HeapUnitTestsSuite(testsuite.TestSuite):
+class PerfTestsSuite(testsuite.TestSuite):
def __init__(self, name, root):
- super(HeapUnitTestsSuite, self).__init__(name, root)
+ super(PerfTestsSuite, self).__init__(name, root)
def ListTests(self, context):
shell = os.path.abspath(os.path.join(context.shell_dir, self.shell()))
@@ -45,8 +45,8 @@ class HeapUnitTestsSuite(testsuite.TestSuite):
context.mode_flags)
def shell(self):
- return "heap-unittests"
+ return "perf-tests"
def GetSuite(name, root):
- return HeapUnitTestsSuite(name, root)
+ return PerfTestsSuite(name, root)
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.