summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 23:27:45 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 23:27:45 +0000
commit69382e04bbb8784d9e09a85de254c2736a79836e (patch)
tree155bf9ba5e77cc776607e67a9e58d6a8a9db9002 /chrome
parentb474c7410486d0ff97734c8ad4f2c740558d28ce (diff)
downloadchromium_src-69382e04bbb8784d9e09a85de254c2736a79836e.zip
chromium_src-69382e04bbb8784d9e09a85de254c2736a79836e.tar.gz
chromium_src-69382e04bbb8784d9e09a85de254c2736a79836e.tar.bz2
Re-enable the DB perf tests and lower the number of iterations per
test from 10 to 5, to make sure all tests finish in less than 10 minutes (seems to be a problem only on the Vista perf bot). TEST=none BUG=none Review URL: http://codereview.chromium.org/1089006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/page_cycler/page_cycler_test.cc34
1 files changed, 25 insertions, 9 deletions
diff --git a/chrome/test/page_cycler/page_cycler_test.cc b/chrome/test/page_cycler/page_cycler_test.cc
index 5c64bb7..dc40036 100644
--- a/chrome/test/page_cycler/page_cycler_test.cc
+++ b/chrome/test/page_cycler/page_cycler_test.cc
@@ -29,9 +29,14 @@
#endif
#ifndef NDEBUG
-#define TEST_ITERATIONS "2"
+#define TEST_ITERATIONS 2
+#define DATABASE_TEST_ITERATIONS 2
#else
-#define TEST_ITERATIONS "10"
+#define TEST_ITERATIONS 10
+// For some unknown reason, the DB perf tests are much much slower on the
+// Vista perf bot, so we have to cut down the number of iterations to 5
+// to make sure each test finishes in less than 10 minutes.
+#define DATABASE_TEST_ITERATIONS 5
#endif
// URL at which data files may be found for HTTP tests. The document root of
@@ -192,6 +197,10 @@ class PageCyclerTest : public UITest {
return false;
}
+ virtual int GetTestIterations() {
+ return TEST_ITERATIONS;
+ }
+
// For HTTP tests, the name must be safe for use in a URL without escaping.
void RunPageCycler(const char* name, std::wstring* pages,
std::string* timings, bool use_http) {
@@ -213,10 +222,11 @@ class PageCyclerTest : public UITest {
// run N iterations
GURL::Replacements replacements;
- const char query_string[] = "iterations=" TEST_ITERATIONS "&auto=1";
+ const std::string query_string =
+ "iterations=" + IntToString(GetTestIterations()) + "&auto=1";
replacements.SetQuery(
- query_string,
- url_parse::Component(0, arraysize(query_string) - 1));
+ query_string.c_str(),
+ url_parse::Component(0, query_string.length()));
test_url = test_url.ReplaceComponents(replacements);
scoped_refptr<TabProxy> tab(GetActiveTab());
@@ -392,6 +402,10 @@ class PageCyclerDatabaseTest : public PageCyclerTest {
virtual bool HasErrors(const std::string timings) {
return HasDatabaseErrors(timings);
}
+
+ virtual int GetTestIterations() {
+ return DATABASE_TEST_ITERATIONS;
+ }
};
class PageCyclerDatabaseReferenceTest : public PageCyclerReferenceTest {
@@ -407,6 +421,10 @@ class PageCyclerDatabaseReferenceTest : public PageCyclerReferenceTest {
virtual bool HasErrors(const std::string timings) {
return HasDatabaseErrors(timings);
}
+
+ virtual int GetTestIterations() {
+ return DATABASE_TEST_ITERATIONS;
+ }
};
// This macro simplifies setting up regular and reference build tests.
@@ -420,13 +438,11 @@ TEST_F(PageCyclerReferenceTest, name) { \
// This macro simplifies setting up regular and reference build tests
// for HTML5 database tests.
-// TODO(dumi): re-enable the DB perf tests once we figure out why
-// they're so slow on the release perf bots
#define PAGE_CYCLER_DATABASE_TESTS(test, name) \
-TEST_F(PageCyclerDatabaseTest, DISABLED_Database##name##File) { \
+TEST_F(PageCyclerDatabaseTest, Database##name##File) { \
RunTest(test, test, false); \
} \
-TEST_F(PageCyclerDatabaseReferenceTest, DISABLED_Database##name##File) { \
+TEST_F(PageCyclerDatabaseReferenceTest, Database##name##File) { \
RunTest(test, test, false); \
}