Commit b1babd99 authored by tfarina@chromium.org's avatar tfarina@chromium.org

Add perf tests target to components.

NOTE: This does not run on perf test bots yet.

BUG=138280
TEST=components_perftests
R=boliu@chromium.org,kaiwang@chromium.org,joi@chromium.org,sky@chromium.org


Review URL: https://chromiumcodereview.appspot.com/13392002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192607 0039d316-1c4b-4281-b951-d872f2087c98
parent ea59da10
...@@ -55,7 +55,34 @@ ...@@ -55,7 +55,34 @@
], ],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations. # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ], 'msvs_disabled_warnings': [4267, ],
} },
{
'target_name': 'components_perftests',
'type': '<(gtest_target_type)',
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:test_support_perf',
'../content/content.gyp:test_support_content',
'../testing/gtest.gyp:gtest',
'../ui/compositor/compositor.gyp:compositor',
'visitedlink_browser',
],
'include_dirs': [
'..',
],
'sources': [
'visitedlink/test/visitedlink_perftest.cc',
],
'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', {
'dependencies': [
'../testing/android/native_test.gyp:native_test_native_code',
],
}],
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [ 4267, ],
},
], ],
'conditions': [ 'conditions': [
['OS == "android" and gtest_target_type == "shared_library"', { ['OS == "android" and gtest_target_type == "shared_library"', {
......
...@@ -40,11 +40,6 @@ class DummyVisitedLinkEventListener : public VisitedLinkMaster::Listener { ...@@ -40,11 +40,6 @@ class DummyVisitedLinkEventListener : public VisitedLinkMaster::Listener {
virtual void NewTable(base::SharedMemory* table) OVERRIDE {} virtual void NewTable(base::SharedMemory* table) OVERRIDE {}
virtual void Add(VisitedLinkCommon::Fingerprint) OVERRIDE {} virtual void Add(VisitedLinkCommon::Fingerprint) OVERRIDE {}
virtual void Reset() OVERRIDE {} virtual void Reset() OVERRIDE {}
static DummyVisitedLinkEventListener* GetInstance() {
static DummyVisitedLinkEventListener instance;
return &instance;
}
}; };
...@@ -84,7 +79,7 @@ class VisitedLink : public testing::Test { ...@@ -84,7 +79,7 @@ class VisitedLink : public testing::Test {
// useful to make another set of tests to test these things in isolation. // useful to make another set of tests to test these things in isolation.
TEST_F(VisitedLink, TestAddAndQuery) { TEST_F(VisitedLink, TestAddAndQuery) {
// init // init
VisitedLinkMaster master(DummyVisitedLinkEventListener::GetInstance(), VisitedLinkMaster master(new DummyVisitedLinkEventListener(),
NULL, true, true, db_path_, 0); NULL, true, true, db_path_, 0);
ASSERT_TRUE(master.Init()); ASSERT_TRUE(master.Init());
...@@ -115,7 +110,7 @@ TEST_F(VisitedLink, TestLoad) { ...@@ -115,7 +110,7 @@ TEST_F(VisitedLink, TestLoad) {
{ {
PerfTimeLogger table_initialization_timer("Table_initialization"); PerfTimeLogger table_initialization_timer("Table_initialization");
VisitedLinkMaster master(DummyVisitedLinkEventListener::GetInstance(), VisitedLinkMaster master(new DummyVisitedLinkEventListener(),
NULL, true, true, db_path_, 0); NULL, true, true, db_path_, 0);
// time init with empty table // time init with empty table
...@@ -153,7 +148,7 @@ TEST_F(VisitedLink, TestLoad) { ...@@ -153,7 +148,7 @@ TEST_F(VisitedLink, TestLoad) {
{ {
PerfTimer cold_timer; PerfTimer cold_timer;
VisitedLinkMaster master(DummyVisitedLinkEventListener::GetInstance(), VisitedLinkMaster master(new DummyVisitedLinkEventListener(),
NULL, NULL,
true, true,
true, true,
...@@ -170,7 +165,7 @@ TEST_F(VisitedLink, TestLoad) { ...@@ -170,7 +165,7 @@ TEST_F(VisitedLink, TestLoad) {
{ {
PerfTimer hot_timer; PerfTimer hot_timer;
VisitedLinkMaster master(DummyVisitedLinkEventListener::GetInstance(), VisitedLinkMaster master(new DummyVisitedLinkEventListener(),
NULL, NULL,
true, true,
true, true,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment