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

Side by Side Diff: bench/nanobench.cpp

Issue 599913002: Have nanobench --verbose mode always just print integer nanoseconds. (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 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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