| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include <ctype.h> | 8 #include <ctype.h> |
| 9 | 9 |
| 10 #include "Benchmark.h" | 10 #include "Benchmark.h" |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 580 | 580 |
| 581 SkAutoTMalloc<double> samples(FLAGS_samples); | 581 SkAutoTMalloc<double> samples(FLAGS_samples); |
| 582 | 582 |
| 583 if (kAutoTuneLoops != FLAGS_loops) { | 583 if (kAutoTuneLoops != FLAGS_loops) { |
| 584 SkDebugf("Fixed number of loops; times would only be misleading so we wo
n't print them.\n"); | 584 SkDebugf("Fixed number of loops; times would only be misleading so we wo
n't print them.\n"); |
| 585 } else if (FLAGS_verbose) { | 585 } else if (FLAGS_verbose) { |
| 586 // No header. | 586 // No header. |
| 587 } else if (FLAGS_quiet) { | 587 } else if (FLAGS_quiet) { |
| 588 SkDebugf("median\tbench\tconfig\n"); | 588 SkDebugf("median\tbench\tconfig\n"); |
| 589 } else { | 589 } else { |
| 590 SkDebugf("maxrss\tloops\tmin\tmedian\tmean\tmax\tstddev\tsamples\tconfig
\tbench\n"); | 590 SkDebugf("maxrss\tloops\tmin\tmedian\tmean\tmax\tstddev\t%-*s\tconfig\tb
ench\n", |
| 591 FLAGS_samples, "samples"); |
| 591 } | 592 } |
| 592 | 593 |
| 593 SkTDArray<Config> configs; | 594 SkTDArray<Config> configs; |
| 594 create_configs(&configs); | 595 create_configs(&configs); |
| 595 | 596 |
| 596 BenchmarkStream benchStream; | 597 BenchmarkStream benchStream; |
| 597 while (Benchmark* b = benchStream.next()) { | 598 while (Benchmark* b = benchStream.next()) { |
| 598 SkAutoTDelete<Benchmark> bench(b); | 599 SkAutoTDelete<Benchmark> bench(b); |
| 599 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getName())) { | 600 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getName())) { |
| 600 continue; | 601 continue; |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 691 |
| 691 return 0; | 692 return 0; |
| 692 } | 693 } |
| 693 | 694 |
| 694 #if !defined SK_BUILD_FOR_IOS | 695 #if !defined SK_BUILD_FOR_IOS |
| 695 int main(int argc, char** argv) { | 696 int main(int argc, char** argv) { |
| 696 SkCommandLineFlags::Parse(argc, argv); | 697 SkCommandLineFlags::Parse(argc, argv); |
| 697 return nanobench_main(); | 698 return nanobench_main(); |
| 698 } | 699 } |
| 699 #endif | 700 #endif |
| OLD | NEW |