Commit 7ee72863 by Sayan Bhattacharjee Committed by Dominic Hamon

Remove unused `doc` argument from `DEFINE_` macros. (#857)

- Adresses : #856 - The unused `doc` argument was removed from the `DEFINE_` macros in `commandlineflags.h` - Converted all the previous `doc` strings passed to the `DEFINE_` macros to multiline comments.
parent 67853d3e
...@@ -51,66 +51,60 @@ ...@@ -51,66 +51,60 @@
#include "thread_manager.h" #include "thread_manager.h"
#include "thread_timer.h" #include "thread_timer.h"
DEFINE_bool(benchmark_list_tests, false, // Print a list of benchmarks. This option overrides all other options.
"Print a list of benchmarks. This option overrides all other " DEFINE_bool(benchmark_list_tests, false);
"options.");
// A regular expression that specifies the set of benchmarks to execute. If
DEFINE_string(benchmark_filter, ".", // this flag is empty, or if this flag is the string \"all\", all benchmarks
"A regular expression that specifies the set of benchmarks " // linked into the binary are run.
"to execute. If this flag is empty, or if this flag is the " DEFINE_string(benchmark_filter, ".");
"string \"all\", all benchmarks linked into the binary are "
"run."); // Minimum number of seconds we should run benchmark before results are
// considered significant. For cpu-time based tests, this is the lower bound
DEFINE_double(benchmark_min_time, 0.5, // on the total cpu time used by all threads that make up the test. For
"Minimum number of seconds we should run benchmark before " // real-time based tests, this is the lower bound on the elapsed time of the
"results are considered significant. For cpu-time based " // benchmark execution, regardless of number of threads.
"tests, this is the lower bound on the total cpu time " DEFINE_double(benchmark_min_time, 0.5);
"used by all threads that make up the test. For real-time "
"based tests, this is the lower bound on the elapsed time " // The number of runs of each benchmark. If greater than 1, the mean and
"of the benchmark execution, regardless of number of " // standard deviation of the runs will be reported.
"threads."); DEFINE_int32(benchmark_repetitions, 1);
DEFINE_int32(benchmark_repetitions, 1, // Report the result of each benchmark repetitions. When 'true' is specified
"The number of runs of each benchmark. If greater than 1, the " // only the mean, standard deviation, and other statistics are reported for
"mean and standard deviation of the runs will be reported."); // repeated benchmarks. Affects all reporters.
DEFINE_bool( benchmark_report_aggregates_only, false);
DEFINE_bool(
benchmark_report_aggregates_only, false, // Display the result of each benchmark repetitions. When 'true' is specified
"Report the result of each benchmark repetitions. When 'true' is specified " // only the mean, standard deviation, and other statistics are displayed for
"only the mean, standard deviation, and other statistics are reported for " // repeated benchmarks. Unlike benchmark_report_aggregates_only, only affects
"repeated benchmarks. Affects all reporters."); // the display reporter, but *NOT* file reporter, which will still contain
// all the output.
DEFINE_bool( DEFINE_bool( benchmark_display_aggregates_only, false);
benchmark_display_aggregates_only, false,
"Display the result of each benchmark repetitions. When 'true' is " // The format to use for console output.
"specified only the mean, standard deviation, and other statistics are " // Valid values are 'console', 'json', or 'csv'.
"displayed for repeated benchmarks. Unlike " DEFINE_string(benchmark_format, "console");
"benchmark_report_aggregates_only, only affects the display reporter, but "
"*NOT* file reporter, which will still contain all the output."); // The format to use for file output.
// Valid values are 'console', 'json', or 'csv'.
DEFINE_string(benchmark_format, "console", DEFINE_string(benchmark_out_format, "json");
"The format to use for console output. Valid values are "
"'console', 'json', or 'csv'."); // The file to write additional output to.
DEFINE_string(benchmark_out, "");
DEFINE_string(benchmark_out_format, "json",
"The format to use for file output. Valid values are " // Whether to use colors in the output. Valid values:
"'console', 'json', or 'csv'."); // 'true'/'yes'/1, 'false'/'no'/0, and 'auto'. 'auto' means to use colors if
// the output is being sent to a terminal and the TERM environment variable is
DEFINE_string(benchmark_out, "", "The file to write additional output to"); // set to a terminal type that supports colors.
DEFINE_string(benchmark_color, "auto");
DEFINE_string(benchmark_color, "auto",
"Whether to use colors in the output. Valid values: " // Whether to use tabular format when printing user counters to the console.
"'true'/'yes'/1, 'false'/'no'/0, and 'auto'. 'auto' means to use " // Valid values: 'true'/'yes'/1, 'false'/'no'/0. Defaults to false.
"colors if the output is being sent to a terminal and the TERM " DEFINE_bool(benchmark_counters_tabular, false);
"environment variable is set to a terminal type that supports "
"colors."); // The level of verbose logging to output
DEFINE_int32(v, 0);
DEFINE_bool(benchmark_counters_tabular, false,
"Whether to use tabular format when printing user counters to "
"the console. Valid values: 'true'/'yes'/1, 'false'/'no'/0."
"Defaults to false.");
DEFINE_int32(v, 0, "The level of verbose logging to output");
namespace benchmark { namespace benchmark {
......
...@@ -15,12 +15,11 @@ ...@@ -15,12 +15,11 @@
#define DECLARE_string(name) extern std::string FLAG(name) #define DECLARE_string(name) extern std::string FLAG(name)
// Macros for defining flags. // Macros for defining flags.
#define DEFINE_bool(name, default_val, doc) bool FLAG(name) = (default_val) #define DEFINE_bool(name, default_val) bool FLAG(name) = (default_val)
#define DEFINE_int32(name, default_val, doc) int32_t FLAG(name) = (default_val) #define DEFINE_int32(name, default_val) int32_t FLAG(name) = (default_val)
#define DEFINE_int64(name, default_val, doc) int64_t FLAG(name) = (default_val) #define DEFINE_int64(name, default_val) int64_t FLAG(name) = (default_val)
#define DEFINE_double(name, default_val, doc) double FLAG(name) = (default_val) #define DEFINE_double(name, default_val) double FLAG(name) = (default_val)
#define DEFINE_string(name, default_val, doc) \ #define DEFINE_string(name, default_val) std::string FLAG(name) = (default_val)
std::string FLAG(name) = (default_val)
namespace benchmark { namespace benchmark {
// Parses a bool/Int32/string from the environment variable // Parses a bool/Int32/string from the environment variable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment