diff options
Diffstat (limited to 'cc/resources/tile_manager_perftest.cc')
-rw-r--r-- | cc/resources/tile_manager_perftest.cc | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/cc/resources/tile_manager_perftest.cc b/cc/resources/tile_manager_perftest.cc index 28f3914..4965132 100644 --- a/cc/resources/tile_manager_perftest.cc +++ b/cc/resources/tile_manager_perftest.cc @@ -14,6 +14,7 @@ #include "cc/test/test_tile_priorities.h" #include "testing/gtest/include/gtest/gtest.h" +#include "testing/perf/perf_test.h" namespace cc { @@ -58,12 +59,6 @@ class TileManagerPerfTest : public testing::Test { picture_pile_ = NULL; } - void AfterTest(const std::string test_name) { - // Format matches chrome/test/perf/perf_test.h:PrintResult - printf( - "*RESULT %s: %.2f runs/s\n", test_name.c_str(), timer_.LapsPerSecond()); - } - TilePriority GetTilePriorityFromBin(ManagedTileBin bin) { switch (bin) { case NOW_AND_READY_TO_DRAW_BIN: @@ -156,7 +151,8 @@ class TileManagerPerfTest : public testing::Test { timer_.NextLap(); } while (!timer_.HasTimeLimitExpired()); - AfterTest(test_name); + perf_test::PrintResult("manage_tiles", "", test_name, + timer_.LapsPerSecond(), "runs/s", true); } private: @@ -171,15 +167,15 @@ class TileManagerPerfTest : public testing::Test { }; TEST_F(TileManagerPerfTest, ManageTiles) { - RunManageTilesTest("manage_tiles_100_0", 100, 0); - RunManageTilesTest("manage_tiles_1000_0", 1000, 0); - RunManageTilesTest("manage_tiles_10000_0", 10000, 0); - RunManageTilesTest("manage_tiles_100_10", 100, 10); - RunManageTilesTest("manage_tiles_1000_10", 1000, 10); - RunManageTilesTest("manage_tiles_10000_10", 10000, 10); - RunManageTilesTest("manage_tiles_100_100", 100, 100); - RunManageTilesTest("manage_tiles_1000_100", 1000, 100); - RunManageTilesTest("manage_tiles_10000_100", 10000, 100); + RunManageTilesTest("100_0", 100, 0); + RunManageTilesTest("1000_0", 1000, 0); + RunManageTilesTest("10000_0", 10000, 0); + RunManageTilesTest("100_10", 100, 10); + RunManageTilesTest("1000_10", 1000, 10); + RunManageTilesTest("10000_10", 10000, 10); + RunManageTilesTest("100_100", 100, 100); + RunManageTilesTest("1000_100", 1000, 100); + RunManageTilesTest("10000_100", 10000, 100); } } // namespace |