Fix typos found by codespell (#1519)

This commit is contained in:
SunBlack 2023-01-10 13:25:32 +01:00 committed by GitHub
parent 37faf6f975
commit fe65457e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 18 additions and 17 deletions

View File

@ -236,7 +236,7 @@ else()
# On most UNIX like platforms g++ and clang++ define _GNU_SOURCE as a # On most UNIX like platforms g++ and clang++ define _GNU_SOURCE as a
# predefined macro, which turns on all of the wonderful libc extensions. # 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. # since we depend on GNU/POSIX/BSD extensions.
if (CYGWIN) if (CYGWIN)
add_definitions(-D_GNU_SOURCE=1) add_definitions(-D_GNU_SOURCE=1)

View File

@ -104,7 +104,7 @@ class __OptionMaker:
options = self.make(func_or_options) options = self.make(func_or_options)
options.builder_calls.append((builder_name, args, kwargs)) options.builder_calls.append((builder_name, args, kwargs))
# The decorator returns Options so it is not technically a decorator # 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 options
return __decorator return __decorator

View File

@ -72,7 +72,7 @@ def manual_timing(state):
@benchmark.register @benchmark.register
def custom_counters(state): def custom_counters(state):
"""Collect cutom metric using benchmark.Counter.""" """Collect custom metric using benchmark.Counter."""
num_foo = 0.0 num_foo = 0.0
while state: while state:
# Benchmark some code here # Benchmark some code here

View File

@ -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. handled at the boundaries where timer collection is also handled.
To opt-in: 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: * If using CMake:
* Install `libpfm4-dev`, e.g. `apt-get install libpfm4-dev`. * Install `libpfm4-dev`, e.g. `apt-get install libpfm4-dev`.
* Enable the CMake flag `BENCHMARK_ENABLE_LIBPFM` in `CMakeLists.txt`. * Enable the CMake flag `BENCHMARK_ENABLE_LIBPFM` in `CMakeLists.txt`.

View File

@ -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 Some of the easier and and effective ways of reducing variance on a typical
Linux workstation are: Linux workstation are:
1. Use the performance governer as [discussed 1. Use the performance governor as [discussed
above](user_guide#disabling-cpu-frequency-scaling). above](user_guide#disabling-cpu-frequency-scaling).
1. Disable processor boosting by: 1. Disable processor boosting by:
```sh ```sh

View File

@ -1845,7 +1845,7 @@ inline double GetTimeUnitMultiplier(TimeUnit unit) {
// Creates a list of integer values for the given range and multiplier. // Creates a list of integer values for the given range and multiplier.
// This can be used together with ArgsProduct() to allow multiple ranges // This can be used together with ArgsProduct() to allow multiple ranges
// with different multiplers. // with different multipliers.
// Example: // Example:
// ArgsProduct({ // ArgsProduct({
// CreateRange(0, 1024, /*multi=*/32), // CreateRange(0, 1024, /*multi=*/32),

View File

@ -73,8 +73,8 @@ BM_DEFINE_string(benchmark_filter, "");
BM_DEFINE_double(benchmark_min_time, 0.5); BM_DEFINE_double(benchmark_min_time, 0.5);
// Minimum number of seconds a benchmark should be run before results should be // 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 // 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 interrest. // needs to fill some form of cache before performance is of interest.
// Note: results gathered within this period are discarded and not used for // Note: results gathered within this period are discarded and not used for
// reported result. // reported result.
BM_DEFINE_double(benchmark_min_warmup_time, 0.0); BM_DEFINE_double(benchmark_min_warmup_time, 0.0);

View File

@ -31,7 +31,7 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
const std::vector<BenchmarkReporter::Run>& reports); const std::vector<BenchmarkReporter::Run>& reports);
// This data structure will contain the result returned by MinimalLeastSq // 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. // interpolated from data.
// - rms : Normalized Root Mean Squared Error. // - rms : Normalized Root Mean Squared Error.
// - complexity : Scalability form (e.g. oN, oNLogN). In case a scalability // - complexity : Scalability form (e.g. oN, oNLogN). In case a scalability

View File

@ -115,7 +115,7 @@ static std::string FormatTime(double time) {
if (time < 100.0) { if (time < 100.0) {
return FormatString("%10.1f", time); 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. // number, we get 10-1(.)-1(e)-1(sign)-2(exponent) = 5 digits to print.
if (time > 9999999999 /*max 10 digit number*/) { if (time > 9999999999 /*max 10 digit number*/) {
return FormatString("%1.4e", time); return FormatString("%1.4e", time);

View File

@ -68,7 +68,7 @@ PerfCounters PerfCounters::Create(
return NoCounters(); return NoCounters();
} }
attr.disabled = is_first; 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 // read_format = PERF_FORMAT_GROUP don't work together, but that's not the
// case. // case.
attr.inherit = true; attr.inherit = true;

View File

@ -22,9 +22,10 @@
namespace benchmark { namespace benchmark {
// Return a vector containing the mean, median and standard devation information // Return a vector containing the mean, median and standard deviation
// (and any user-specified info) for the specified list of reports. If 'reports' // information (and any user-specified info) for the specified list of reports.
// contains less than two non-errored runs an empty vector is returned // If 'reports' contains less than two non-errored runs an empty vector is
// returned
BENCHMARK_EXPORT BENCHMARK_EXPORT
std::vector<BenchmarkReporter::Run> ComputeStats( std::vector<BenchmarkReporter::Run> ComputeStats(
const std::vector<BenchmarkReporter::Run>& reports); const std::vector<BenchmarkReporter::Run>& reports);

View File

@ -441,7 +441,7 @@ std::string GetSystemName() {
return str; return str;
#else #else
#ifndef HOST_NAME_MAX #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 #define HOST_NAME_MAX 64
#elif defined(BENCHMARK_OS_NACL) #elif defined(BENCHMARK_OS_NACL)
#define HOST_NAME_MAX 64 #define HOST_NAME_MAX 64

View File

@ -58,7 +58,7 @@ def classify_input_file(filename):
""" """
Return a tuple (type, msg) where 'type' specifies the classified type Return a tuple (type, msg) where 'type' specifies the classified type
of 'filename'. If 'type' is 'IT_Invalid' then 'msg' is a human readable of 'filename'. If 'type' is 'IT_Invalid' then 'msg' is a human readable
string represeting the error. string representing the error.
""" """
ftype = IT_Invalid ftype = IT_Invalid
err_msg = None err_msg = None