Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: bench/nanobench.cpp

Issue 581083002: nanobench: print max RSS in debug mode too. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 log->timer("min_ms", stats.min); 665 log->timer("min_ms", stats.min);
666 log->timer("median_ms", stats.median); 666 log->timer("median_ms", stats.median);
667 log->timer("mean_ms", stats.mean); 667 log->timer("mean_ms", stats.mean);
668 log->timer("max_ms", stats.max); 668 log->timer("max_ms", stats.max);
669 log->timer("stddev_ms", sqrt(stats.var)); 669 log->timer("stddev_ms", sqrt(stats.var));
670 670
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("%s\t%s\n", bench->getUniqueName(), config); 675 SkDebugf("%4dM\t%s\t%s\n"
676 , sk_tools::getMaxResidentSetSizeMB()
677 , bench->getUniqueName()
678 , config);
676 } else if (FLAGS_verbose) { 679 } else if (FLAGS_verbose) {
677 for (int i = 0; i < FLAGS_samples; i++) { 680 for (int i = 0; i < FLAGS_samples; i++) {
678 SkDebugf("%s ", HUMANIZE(samples[i])); 681 SkDebugf("%s ", HUMANIZE(samples[i]));
679 } 682 }
680 SkDebugf("%s\n", bench->getUniqueName()); 683 SkDebugf("%s\n", bench->getUniqueName());
681 } else if (FLAGS_quiet) { 684 } else if (FLAGS_quiet) {
682 if (targets.count() == 1) { 685 if (targets.count() == 1) {
683 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.
684 } 687 }
685 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);
(...skipping 27 matching lines...) Expand all
713 716
714 return 0; 717 return 0;
715 } 718 }
716 719
717 #if !defined SK_BUILD_FOR_IOS 720 #if !defined SK_BUILD_FOR_IOS
718 int main(int argc, char** argv) { 721 int main(int argc, char** argv) {
719 SkCommandLineFlags::Parse(argc, argv); 722 SkCommandLineFlags::Parse(argc, argv);
720 return nanobench_main(); 723 return nanobench_main();
721 } 724 }
722 #endif 725 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698