diff options
author | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-28 12:18:40 +0000 |
---|---|---|
committer | robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-28 12:18:40 +0000 |
commit | 91ee3a11ed476f4f08e1e4ae183002c56349ec19 (patch) | |
tree | 399941959a101053debe53ac361d60ecfc1786a8 /tools | |
parent | 2af1b188aa186936a78696e00170167204d9a666 (diff) |
Added second "truncated" cpu/wall timer to bench
http://codereview.appspot.com/6476064/
This CL will increase the bench baselines across the board
git-svn-id: http://skia.googlecode.com/svn/trunk@5305 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r-- | tools/PictureBenchmark.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/PictureBenchmark.cpp b/tools/PictureBenchmark.cpp index df30d5a561..164d3c356c 100644 --- a/tools/PictureBenchmark.cpp +++ b/tools/PictureBenchmark.cpp @@ -43,7 +43,7 @@ void PipePictureBenchmark::run(SkPicture* pict) { fRenderer.resetState(); BenchTimer* timer = this->setupTimer(); - double wall_time = 0; + double wall_time = 0, truncated_wall_time = 0; #if SK_SUPPORT_GPU double gpu_time = 0; #endif @@ -55,6 +55,7 @@ void PipePictureBenchmark::run(SkPicture* pict) { fRenderer.resetState(); wall_time += timer->fWall; + truncated_wall_time += timer->fTruncatedWall; #if SK_SUPPORT_GPU if (fRenderer.isUsingGpuDevice()) { gpu_time += timer->fGpu; @@ -83,7 +84,7 @@ void RecordPictureBenchmark::run(SkPicture* pict) { } BenchTimer* timer = setupTimer(); - double wall_time = 0; + double wall_time = 0, truncated_wall_time = 0; for (int i = 0; i < fRepeats + 1; ++i) { SkPicture replayer; @@ -96,6 +97,7 @@ void RecordPictureBenchmark::run(SkPicture* pict) { // We want to ignore first time effects if (i > 0) { wall_time += timer->fWall; + truncated_wall_time += timer->fTruncatedWall; } } @@ -121,7 +123,7 @@ void SimplePictureBenchmark::run(SkPicture* pict) { BenchTimer* timer = this->setupTimer(); - double wall_time = 0; + double wall_time = 0, truncated_wall_time = 0; #if SK_SUPPORT_GPU double gpu_time = 0; #endif @@ -133,6 +135,7 @@ void SimplePictureBenchmark::run(SkPicture* pict) { fRenderer.resetState(); wall_time += timer->fWall; + truncated_wall_time += timer->fTruncatedWall; #if SK_SUPPORT_GPU if (fRenderer.isUsingGpuDevice()) { gpu_time += timer->fGpu; @@ -169,7 +172,7 @@ void TiledPictureBenchmark::run(SkPicture* pict) { fRenderer.resetState(); BenchTimer* timer = setupTimer(); - double wall_time = 0; + double wall_time = 0, truncated_wall_time = 0; #if SK_SUPPORT_GPU double gpu_time = 0; #endif @@ -181,6 +184,7 @@ void TiledPictureBenchmark::run(SkPicture* pict) { fRenderer.resetState(); wall_time += timer->fWall; + truncated_wall_time += timer->fTruncatedWall; #if SK_SUPPORT_GPU if (fRenderer.isUsingGpuDevice()) { gpu_time += timer->fGpu; @@ -216,7 +220,7 @@ void UnflattenPictureBenchmark::run(SkPicture* pict) { } BenchTimer* timer = setupTimer(); - double wall_time = 0; + double wall_time = 0, truncated_wall_time = 0; for (int i = 0; i < fRepeats + 1; ++i) { SkPicture replayer; @@ -231,6 +235,7 @@ void UnflattenPictureBenchmark::run(SkPicture* pict) { // We want to ignore first time effects if (i > 0) { wall_time += timer->fWall; + truncated_wall_time += timer->fTruncatedWall; } } |