mirror of https://github.com/google/benchmark.git
Fix typos found by codespell (#1519)
This commit is contained in:
parent
37faf6f975
commit
fe65457e80
|
@ -236,7 +236,7 @@ else()
|
|||
|
||||
# On most UNIX like platforms g++ and clang++ define _GNU_SOURCE as a
|
||||
# predefined macro, which turns on all of the wonderful libc extensions.
|
||||
# However g++ doesn't do this in Cygwin so we have to define it ourselfs
|
||||
# However g++ doesn't do this in Cygwin so we have to define it ourselves
|
||||
# since we depend on GNU/POSIX/BSD extensions.
|
||||
if (CYGWIN)
|
||||
add_definitions(-D_GNU_SOURCE=1)
|
||||
|
|
|
@ -104,7 +104,7 @@ class __OptionMaker:
|
|||
options = self.make(func_or_options)
|
||||
options.builder_calls.append((builder_name, args, kwargs))
|
||||
# The decorator returns Options so it is not technically a decorator
|
||||
# and needs a final call to @regiser
|
||||
# and needs a final call to @register
|
||||
return options
|
||||
|
||||
return __decorator
|
||||
|
|
|
@ -72,7 +72,7 @@ def manual_timing(state):
|
|||
|
||||
@benchmark.register
|
||||
def custom_counters(state):
|
||||
"""Collect cutom metric using benchmark.Counter."""
|
||||
"""Collect custom metric using benchmark.Counter."""
|
||||
num_foo = 0.0
|
||||
while state:
|
||||
# Benchmark some code here
|
||||
|
|
|
@ -19,7 +19,7 @@ The feature does not require modifying benchmark code. Counter collection is
|
|||
handled at the boundaries where timer collection is also handled.
|
||||
|
||||
To opt-in:
|
||||
* If using a Bazel build, add `--define pfm=1` to your buid flags
|
||||
* If using a Bazel build, add `--define pfm=1` to your build flags
|
||||
* If using CMake:
|
||||
* Install `libpfm4-dev`, e.g. `apt-get install libpfm4-dev`.
|
||||
* Enable the CMake flag `BENCHMARK_ENABLE_LIBPFM` in `CMakeLists.txt`.
|
||||
|
|
|
@ -70,7 +70,7 @@ reason some companies maintain machines dedicated to performance testing.
|
|||
Some of the easier and and effective ways of reducing variance on a typical
|
||||
Linux workstation are:
|
||||
|
||||
1. Use the performance governer as [discussed
|
||||
1. Use the performance governor as [discussed
|
||||
above](user_guide#disabling-cpu-frequency-scaling).
|
||||
1. Disable processor boosting by:
|
||||
```sh
|
||||
|
|
|
@ -1845,7 +1845,7 @@ inline double GetTimeUnitMultiplier(TimeUnit unit) {
|
|||
|
||||
// Creates a list of integer values for the given range and multiplier.
|
||||
// This can be used together with ArgsProduct() to allow multiple ranges
|
||||
// with different multiplers.
|
||||
// with different multipliers.
|
||||
// Example:
|
||||
// ArgsProduct({
|
||||
// CreateRange(0, 1024, /*multi=*/32),
|
||||
|
|
|
@ -73,8 +73,8 @@ BM_DEFINE_string(benchmark_filter, "");
|
|||
BM_DEFINE_double(benchmark_min_time, 0.5);
|
||||
|
||||
// Minimum number of seconds a benchmark should be run before results should be
|
||||
// taken into account. This e.g can be neccessary for benchmarks of code which
|
||||
// needs to fill some form of cache before performance is of interrest.
|
||||
// taken into account. This e.g can be necessary for benchmarks of code which
|
||||
// needs to fill some form of cache before performance is of interest.
|
||||
// Note: results gathered within this period are discarded and not used for
|
||||
// reported result.
|
||||
BM_DEFINE_double(benchmark_min_warmup_time, 0.0);
|
||||
|
|
|
@ -31,7 +31,7 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
|
|||
const std::vector<BenchmarkReporter::Run>& reports);
|
||||
|
||||
// This data structure will contain the result returned by MinimalLeastSq
|
||||
// - coef : Estimated coeficient for the high-order term as
|
||||
// - coef : Estimated coefficient for the high-order term as
|
||||
// interpolated from data.
|
||||
// - rms : Normalized Root Mean Squared Error.
|
||||
// - complexity : Scalability form (e.g. oN, oNLogN). In case a scalability
|
||||
|
|
|
@ -115,7 +115,7 @@ static std::string FormatTime(double time) {
|
|||
if (time < 100.0) {
|
||||
return FormatString("%10.1f", time);
|
||||
}
|
||||
// Assuming the time ist at max 9.9999e+99 and we have 10 digits for the
|
||||
// Assuming the time is at max 9.9999e+99 and we have 10 digits for the
|
||||
// number, we get 10-1(.)-1(e)-1(sign)-2(exponent) = 5 digits to print.
|
||||
if (time > 9999999999 /*max 10 digit number*/) {
|
||||
return FormatString("%1.4e", time);
|
||||
|
|
|
@ -68,7 +68,7 @@ PerfCounters PerfCounters::Create(
|
|||
return NoCounters();
|
||||
}
|
||||
attr.disabled = is_first;
|
||||
// Note: the man page for perf_event_create suggests inerit = true and
|
||||
// Note: the man page for perf_event_create suggests inherit = true and
|
||||
// read_format = PERF_FORMAT_GROUP don't work together, but that's not the
|
||||
// case.
|
||||
attr.inherit = true;
|
||||
|
|
|
@ -22,9 +22,10 @@
|
|||
|
||||
namespace benchmark {
|
||||
|
||||
// Return a vector containing the mean, median and standard devation information
|
||||
// (and any user-specified info) for the specified list of reports. If 'reports'
|
||||
// contains less than two non-errored runs an empty vector is returned
|
||||
// Return a vector containing the mean, median and standard deviation
|
||||
// information (and any user-specified info) for the specified list of reports.
|
||||
// If 'reports' contains less than two non-errored runs an empty vector is
|
||||
// returned
|
||||
BENCHMARK_EXPORT
|
||||
std::vector<BenchmarkReporter::Run> ComputeStats(
|
||||
const std::vector<BenchmarkReporter::Run>& reports);
|
||||
|
|
|
@ -441,7 +441,7 @@ std::string GetSystemName() {
|
|||
return str;
|
||||
#else
|
||||
#ifndef HOST_NAME_MAX
|
||||
#ifdef BENCHMARK_HAS_SYSCTL // BSD/Mac Doesnt have HOST_NAME_MAX defined
|
||||
#ifdef BENCHMARK_HAS_SYSCTL // BSD/Mac doesn't have HOST_NAME_MAX defined
|
||||
#define HOST_NAME_MAX 64
|
||||
#elif defined(BENCHMARK_OS_NACL)
|
||||
#define HOST_NAME_MAX 64
|
||||
|
|
|
@ -145,7 +145,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
// Setup is called 4 times, once for each arg group (1,3,5,7)
|
||||
assert(fixture_interaction::setup == 4);
|
||||
// Fixture::Setup is called everytime the bm routine is run.
|
||||
// Fixture::Setup is called every time the bm routine is run.
|
||||
// The exact number is indeterministic, so we just assert that
|
||||
// it's more than setup.
|
||||
assert(fixture_interaction::fixture_setup > fixture_interaction::setup);
|
||||
|
|
|
@ -58,7 +58,7 @@ def classify_input_file(filename):
|
|||
"""
|
||||
Return a tuple (type, msg) where 'type' specifies the classified type
|
||||
of 'filename'. If 'type' is 'IT_Invalid' then 'msg' is a human readable
|
||||
string represeting the error.
|
||||
string representing the error.
|
||||
"""
|
||||
ftype = IT_Invalid
|
||||
err_msg = None
|
||||
|
|
Loading…
Reference in New Issue