aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-05-31 13:27:52 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-31 17:56:26 +0000
commit65eb4fba7e22bc5e5420290a4ef31e59054609e5 (patch)
treef2fde02088fb7b413cce6699101ef4674cae268b /tools
parent774168efac172d096cd7f09841bce51650cb6e84 (diff)
Add DDL skpbench bot for just DDL recording time
Change-Id: If75799bfd719ccc47c2064571723e6852c07bfaa Reviewed-on: https://skia-review.googlesource.com/131144 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Eric Boren <borenet@google.com> Reviewed-by: Kevin Lubick <kjlubick@google.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/skpbench/skpbench.cpp9
-rwxr-xr-xtools/skpbench/skpbench.py4
2 files changed, 10 insertions, 3 deletions
diff --git a/tools/skpbench/skpbench.cpp b/tools/skpbench/skpbench.cpp
index f8a6e9b1a8..a4583ce0f6 100644
--- a/tools/skpbench/skpbench.cpp
+++ b/tools/skpbench/skpbench.cpp
@@ -51,6 +51,7 @@
DEFINE_bool(ddl, false, "record the skp into DDLs before rendering");
DEFINE_int32(ddlNumAdditionalThreads, 0, "number of DDL recording threads in addition to main one");
DEFINE_int32(ddlTilingWidthHeight, 0, "number of tiles along one edge when in DDL mode");
+DEFINE_bool(ddlRecordTime, false, "report just the cpu time spent recording DDLs");
DEFINE_int32(duration, 5000, "number of milliseconds to run the benchmark");
DEFINE_int32(sampleMs, 50, "minimum duration of a sample");
@@ -117,9 +118,11 @@ static void ddl_sample(GrContext* context, DDLTileHelper* tiles, GpuSync* gpuSyn
tiles->createDDLsInParallel();
- tiles->drawAllTilesAndFlush(context, true);
- if (gpuSync) {
- gpuSync->syncToPreviousFrame();
+ if (!FLAGS_ddlRecordTime) {
+ tiles->drawAllTilesAndFlush(context, true);
+ if (gpuSync) {
+ gpuSync->syncToPreviousFrame();
+ }
}
*startStopTime = clock::now();
diff --git a/tools/skpbench/skpbench.py b/tools/skpbench/skpbench.py
index bb88a76a1d..a9ec618ab2 100755
--- a/tools/skpbench/skpbench.py
+++ b/tools/skpbench/skpbench.py
@@ -73,6 +73,8 @@ __argparse.add_argument('--ddlNumAdditionalThreads',
help="number of DDL recording threads in addition to main one")
__argparse.add_argument('--ddlTilingWidthHeight',
type=int, default=0, help="number of tiles along one edge when in DDL mode")
+__argparse.add_argument('--ddlRecordTime',
+ action='store_true', help="report just the cpu time spent recording DDLs")
__argparse.add_argument('skps',
nargs='+',
help=".skp files or directories to expand for .skp files")
@@ -136,6 +138,8 @@ class SKPBench:
str(FLAGS.ddlNumAdditionalThreads)])
if FLAGS.ddlTilingWidthHeight:
ARGV.extend(['--ddlTilingWidthHeight', str(FLAGS.ddlTilingWidthHeight)])
+ if FLAGS.ddlRecordTime:
+ ARGV.extend(['--ddlRecordTime', 'true'])
if FLAGS.adb:
if FLAGS.device_serial is None: