Commit 7dbb46f6 authored by vmpstr@chromium.org's avatar vmpstr@chromium.org

cc: Fix tile manager raster tile iterator perftest.

This test is currently broken, as it doesn't really reset the initial
conditions each run.

NOTE TO PERF SHERIFFS
---------------------

This is very likely to regress all of the
tile_manager_raster_tile_iterator tests. This is expected, as the test
currently doesn't do anything useful. This is a correctness fix for
that test.

R=reveman, enne

Review URL: https://codereview.chromium.org/283463003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@269885 0039d316-1c4b-4281-b951-d872f2087c98
parent 930bed49
...@@ -299,16 +299,17 @@ class TileManagerTileIteratorPerfTest : public testing::Test, ...@@ -299,16 +299,17 @@ class TileManagerTileIteratorPerfTest : public testing::Test,
pending_layer_->SetAllTilesVisible(); pending_layer_->SetAllTilesVisible();
} }
void RunTest(const std::string& test_name, unsigned tile_count) { void RunTest(const std::string& test_name, int tile_count) {
timer_.Reset(); timer_.Reset();
do { do {
int count = tile_count;
for (TileManager::RasterTileIterator it(tile_manager(), for (TileManager::RasterTileIterator it(tile_manager(),
SAME_PRIORITY_FOR_BOTH_TREES); SAME_PRIORITY_FOR_BOTH_TREES);
it && tile_count; it && count;
++it) { ++it) {
--tile_count; --count;
} }
ASSERT_EQ(0u, tile_count); ASSERT_EQ(0, count);
timer_.NextLap(); timer_.NextLap();
} while (!timer_.HasTimeLimitExpired()); } while (!timer_.HasTimeLimitExpired());
......
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