aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skpbench/skpbench.cpp
diff options
context:
space:
mode:
authorGravatar csmartdalton <csmartdalton@google.com>2016-09-22 05:10:02 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-09-22 05:10:03 -0700
commitd7a9db644496785100c4e61add1c9f8ed0494408 (patch)
tree0ccc969ee1969077f7a7147c470ded84201b16cf /tools/skpbench/skpbench.cpp
parent50537e46e4f0999df0a4707b227000cfa8c800ff (diff)
Add hardware monitoring to skpbench
Adds a Hardware class with hooks for entering and exiting "benchmarking" mode (e.g. locking clocks, etc.) as well as periodic polling of hardware to verify the environment is stable. Adds a partial implementation for generic Android hardware, but ultimately we will need to write specific classes tailored to each unique platform we need to test. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2360473002 Review-Url: https://codereview.chromium.org/2360473002
Diffstat (limited to 'tools/skpbench/skpbench.cpp')
-rw-r--r--tools/skpbench/skpbench.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/skpbench/skpbench.cpp b/tools/skpbench/skpbench.cpp
index afe44b5c7b..063261a448 100644
--- a/tools/skpbench/skpbench.cpp
+++ b/tools/skpbench/skpbench.cpp
@@ -186,13 +186,13 @@ int main(int argc, char** argv) {
SkCommandLineConfigArray configs;
ParseConfigs(FLAGS_config, &configs);
if (configs.count() != 1 || !(config = configs[0]->asConfigGpu())) {
- exitf(ExitErr::kUsage, "invalid config %s; must specify one (and only one) GPU config",
+ exitf(ExitErr::kUsage, "invalid config %s, must specify one (and only one) GPU config",
join(FLAGS_config).c_str());
}
// Parse the skp.
if (FLAGS_skp.count() != 1) {
- exitf(ExitErr::kUsage, "invalid skp \"%s\"; one (and only one) skp must be specified.",
+ exitf(ExitErr::kUsage, "invalid skp %s, must specify (and only one) skp path name.",
join(FLAGS_skp).c_str());
}
const char* skpfile = FLAGS_skp[0];
@@ -206,10 +206,11 @@ int main(int argc, char** argv) {
}
int width = SkTMin(SkScalarCeilToInt(skp->cullRect().width()), 2048),
height = SkTMin(SkScalarCeilToInt(skp->cullRect().height()), 2048);
- if (FLAGS_verbosity >= 2 &&
+ if (FLAGS_verbosity >= 3 &&
(width != skp->cullRect().width() || height != skp->cullRect().height())) {
- fprintf(stderr, "NOTE: %s is too large (%ix%i); cropping to %ix%i.\n",
- skpfile, SkScalarCeilToInt(skp->cullRect().width()),
+ fprintf(stderr, "%s is too large (%ix%i), cropping to %ix%i.\n",
+ SkOSPath::Basename(skpfile).c_str(),
+ SkScalarCeilToInt(skp->cullRect().width()),
SkScalarCeilToInt(skp->cullRect().height()), width, height);
}