Chromium Code Reviews| 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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 671 if (kAutoTuneLoops != FLAGS_loops) { | 671 if (kAutoTuneLoops != FLAGS_loops) { |
| 672 if (targets.count() == 1) { | 672 if (targets.count() == 1) { |
| 673 config = ""; // Only print the config if we run the same ben ch on more than one. | 673 config = ""; // Only print the config if we run the same ben ch on more than one. |
| 674 } | 674 } |
| 675 SkDebugf("%4dM\t%s\t%s\n" | 675 SkDebugf("%4dM\t%s\t%s\n" |
| 676 , sk_tools::getMaxResidentSetSizeMB() | 676 , sk_tools::getMaxResidentSetSizeMB() |
| 677 , bench->getUniqueName() | 677 , bench->getUniqueName() |
| 678 , config); | 678 , config); |
| 679 } else if (FLAGS_verbose) { | 679 } else if (FLAGS_verbose) { |
| 680 for (int i = 0; i < FLAGS_samples; i++) { | 680 for (int i = 0; i < FLAGS_samples; i++) { |
| 681 SkDebugf("%s ", HUMANIZE(samples[i])); | 681 SkDebugf("%lld ", (uint64_t)(samples[i] * 1000000)); |
|
tfarina
2014/09/24 13:22:30
looks fine.
| |
| 682 } | 682 } |
| 683 SkDebugf("%s\n", bench->getUniqueName()); | 683 SkDebugf("%s\n", bench->getUniqueName()); |
| 684 } else if (FLAGS_quiet) { | 684 } else if (FLAGS_quiet) { |
| 685 if (targets.count() == 1) { | 685 if (targets.count() == 1) { |
| 686 config = ""; // Only print the config if we run the same ben ch on more than one. | 686 config = ""; // Only print the config if we run the same ben ch on more than one. |
| 687 } | 687 } |
| 688 SkDebugf("%s\t%s\t%s\n", HUMANIZE(stats.median), bench->getUniqu eName(), config); | 688 SkDebugf("%s\t%s\t%s\n", HUMANIZE(stats.median), bench->getUniqu eName(), config); |
| 689 } else { | 689 } else { |
| 690 const double stddev_percent = 100 * sqrt(stats.var) / stats.mean ; | 690 const double stddev_percent = 100 * sqrt(stats.var) / stats.mean ; |
| 691 SkDebugf("%4dM\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\t%s\t%s\n" | 691 SkDebugf("%4dM\t%d\t%s\t%s\t%s\t%s\t%.0f%%\t%s\t%s\t%s\n" |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 716 | 716 |
| 717 return 0; | 717 return 0; |
| 718 } | 718 } |
| 719 | 719 |
| 720 #if !defined SK_BUILD_FOR_IOS | 720 #if !defined SK_BUILD_FOR_IOS |
| 721 int main(int argc, char** argv) { | 721 int main(int argc, char** argv) { |
| 722 SkCommandLineFlags::Parse(argc, argv); | 722 SkCommandLineFlags::Parse(argc, argv); |
| 723 return nanobench_main(); | 723 return nanobench_main(); |
| 724 } | 724 } |
| 725 #endif | 725 #endif |
| OLD | NEW |