| 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 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 Stats stats(samples.get(), FLAGS_samples); | 726 Stats stats(samples.get(), FLAGS_samples); |
| 727 log->config(config); | 727 log->config(config); |
| 728 log->configOption("name", bench->getName()); | 728 log->configOption("name", bench->getName()); |
| 729 benchStream.fillCurrentOptions(log.get()); | 729 benchStream.fillCurrentOptions(log.get()); |
| 730 #if SK_SUPPORT_GPU | 730 #if SK_SUPPORT_GPU |
| 731 if (Benchmark::kGPU_Backend == targets[j]->config.backend) { | 731 if (Benchmark::kGPU_Backend == targets[j]->config.backend) { |
| 732 fill_gpu_options(log.get(), targets[j]->gl); | 732 fill_gpu_options(log.get(), targets[j]->gl); |
| 733 } | 733 } |
| 734 #endif | 734 #endif |
| 735 log->metric("min_ms", stats.min); | 735 log->metric("min_ms", stats.min); |
| 736 log->metric("median_ms", stats.median); | |
| 737 log->metric("mean_ms", stats.mean); | |
| 738 log->metric("max_ms", stats.max); | |
| 739 log->metric("stddev_ms", sqrt(stats.var)); | |
| 740 if (runs++ % FLAGS_flushEvery == 0) { | 736 if (runs++ % FLAGS_flushEvery == 0) { |
| 741 log->flush(); | 737 log->flush(); |
| 742 } | 738 } |
| 743 | 739 |
| 744 if (kAutoTuneLoops != FLAGS_loops) { | 740 if (kAutoTuneLoops != FLAGS_loops) { |
| 745 if (targets.count() == 1) { | 741 if (targets.count() == 1) { |
| 746 config = ""; // Only print the config if we run the same ben
ch on more than one. | 742 config = ""; // Only print the config if we run the same ben
ch on more than one. |
| 747 } | 743 } |
| 748 SkDebugf("%4dM\t%s\t%s\n" | 744 SkDebugf("%4dM\t%s\t%s\n" |
| 749 , sk_tools::getMaxResidentSetSizeMB() | 745 , sk_tools::getMaxResidentSetSizeMB() |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 | 795 |
| 800 return 0; | 796 return 0; |
| 801 } | 797 } |
| 802 | 798 |
| 803 #if !defined SK_BUILD_FOR_IOS | 799 #if !defined SK_BUILD_FOR_IOS |
| 804 int main(int argc, char** argv) { | 800 int main(int argc, char** argv) { |
| 805 SkCommandLineFlags::Parse(argc, argv); | 801 SkCommandLineFlags::Parse(argc, argv); |
| 806 return nanobench_main(); | 802 return nanobench_main(); |
| 807 } | 803 } |
| 808 #endif | 804 #endif |
| OLD | NEW |