Skip to content

Commit 0768b72

Browse files
Fix some typos in identifiers
1 parent 4f6a6b6 commit 0768b72

24 files changed

+72
-72
lines changed

src/BenchmarkDotNet.Diagnostics.Windows/EtwProfilerConfig.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class EtwProfilerConfig
1717

1818
public int BufferSizeInMb { get; }
1919

20-
public float CpuSampleIntervalInMiliseconds { get; }
20+
public float CpuSampleIntervalInMilliseconds { get; }
2121

2222
public KernelTraceEventParser.Keywords KernelKeywords { get; }
2323

@@ -29,15 +29,15 @@ public class EtwProfilerConfig
2929

3030
/// <param name="performExtraBenchmarksRun">if set to true, benchmarks will be executed one more time with the profiler attached. If set to false, there will be no extra run but the results will contain overhead. True by default.</param>
3131
/// <param name="bufferSizeInMb">ETW session buffer size, in MB. 256 by default</param>
32-
/// <param name="cpuSampleIntervalInMiliseconds">The rate at which CPU samples are collected. By default this is 1 (once a millisecond per CPU). There is a lower bound on this (typically 0.125 ms)</param>
32+
/// <param name="cpuSampleIntervalInMilliseconds">The rate at which CPU samples are collected. By default this is 1 (once a millisecond per CPU). There is a lower bound on this (typically 0.125 ms)</param>
3333
/// <param name="intervalSelectors">interval per hardware counter, if not provided then default values will be used.</param>
3434
/// <param name="kernelKeywords">kernel session keywords, ImageLoad (for native stack frames) and Profile (for CPU Stacks) are the defaults</param>
3535
/// <param name="providers">providers that should be enabled, if not provided then default values will be used</param>
3636
/// <param name="createHeapSession">value indicating whether to create heap session. False by default, used internally by NativeMemoryProfiler.</param>
3737
public EtwProfilerConfig(
3838
bool performExtraBenchmarksRun = true,
3939
int bufferSizeInMb = 256,
40-
float cpuSampleIntervalInMiliseconds = 1.0f,
40+
float cpuSampleIntervalInMilliseconds = 1.0f,
4141
KernelTraceEventParser.Keywords kernelKeywords = KernelTraceEventParser.Keywords.ImageLoad | KernelTraceEventParser.Keywords.Profile,
4242
IReadOnlyDictionary<HardwareCounter, Func<ProfileSourceInfo, int>> intervalSelectors = null,
4343
IReadOnlyCollection<(Guid providerGuid, TraceEventLevel providerLevel, ulong keywords, TraceEventProviderOptions options)> providers = null,
@@ -47,7 +47,7 @@ public EtwProfilerConfig(
4747
KernelKeywords = kernelKeywords;
4848
PerformExtraBenchmarksRun = performExtraBenchmarksRun;
4949
BufferSizeInMb = bufferSizeInMb;
50-
CpuSampleIntervalInMiliseconds = cpuSampleIntervalInMiliseconds;
50+
CpuSampleIntervalInMilliseconds = cpuSampleIntervalInMilliseconds;
5151
IntervalSelectors = intervalSelectors ?? new Dictionary<HardwareCounter, Func<ProfileSourceInfo, int>>
5252
{
5353
// following values come from xunit-performance, were selected based on a many trace files from benchmark runs

src/BenchmarkDotNet.Diagnostics.Windows/Sessions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected Session(string sessionName, DiagnoserActionParameters details, EtwProf
109109
TraceEventSession = new TraceEventSession(sessionName, FilePath)
110110
{
111111
BufferSizeMB = config.BufferSizeInMb,
112-
CpuSampleIntervalMSec = config.CpuSampleIntervalInMiliseconds,
112+
CpuSampleIntervalMSec = config.CpuSampleIntervalInMilliseconds,
113113
};
114114

115115
Console.CancelKeyPress += OnConsoleCancelKeyPress;

src/BenchmarkDotNet.Disassembler.x64/Program.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ static void Handle(Settings settings)
6868

6969
var state = new State(runtime, (IDebugControl)dataTarget.DebuggerInterface);
7070

71-
var disasembledMethods = Disassemble(settings, runtime, state);
71+
var disassembledMethods = Disassemble(settings, runtime, state);
7272

7373
// we don't want to export the disassembler entry point method which is just an artificial method added to get generic types working
74-
var methodsToExport = disasembledMethods.Where(method =>
75-
disasembledMethods.Count == 1 // if there is only one method we want to return it (most probably benchmark got inlined)
74+
var methodsToExport = disassembledMethods.Where(method =>
75+
disassembledMethods.Count == 1 // if there is only one method we want to return it (most probably benchmark got inlined)
7676
|| !method.Name.Contains(DisassemblerConstants.DisassemblerEntryMethodName)).ToArray();
7777

7878
using (var stream = new FileStream(settings.ResultsPath, FileMode.Append, FileAccess.Write))
@@ -326,7 +326,7 @@ static string ReadSourceLine(string file, int line)
326326

327327
static string TryEnqueueCalledMethod(string textRepresentation, State state, int depth, ClrMethod currentMethod)
328328
{
329-
if (!TryGetHexAdress(textRepresentation, out ulong address))
329+
if (!TryGetHexAddress(textRepresentation, out ulong address))
330330
return null; // call qword ptr [rax+20h] // needs further research
331331

332332
var method = state.Runtime.GetMethodByAddress(address);
@@ -343,7 +343,7 @@ static string TryEnqueueCalledMethod(string textRepresentation, State state, int
343343
return method.GetFullSignature();
344344
}
345345

346-
static bool TryGetHexAdress(string textRepresentation, out ulong address)
346+
static bool TryGetHexAddress(string textRepresentation, out ulong address)
347347
{
348348
// it's always "something call something addr`ess something"
349349
// 00007ffe`16fb04e4 e897fbffff call 00007ffe`16fb0080 // static or instance method call
@@ -558,17 +558,17 @@ internal MethodInfo(ClrMethod method, int depth)
558558

559559
struct MethodId : IEquatable<MethodId>
560560
{
561-
internal uint MethodMetatadataTokenId { get; }
562-
internal uint TypeMetatadataTokenId { get; }
561+
internal uint MethodMetadataTokenId { get; }
562+
internal uint TypeMetadataTokenId { get; }
563563

564-
public MethodId(uint methodMetatadataTokenId, uint typeMetatadataTokenId) : this()
564+
public MethodId(uint methodMetadataTokenId, uint typeMetadataTokenId) : this()
565565
{
566-
MethodMetatadataTokenId = methodMetatadataTokenId;
567-
TypeMetatadataTokenId = typeMetatadataTokenId;
566+
MethodMetadataTokenId = methodMetadataTokenId;
567+
TypeMetadataTokenId = typeMetadataTokenId;
568568
}
569569

570-
public bool Equals(MethodId other) => MethodMetatadataTokenId == other.MethodMetatadataTokenId && TypeMetatadataTokenId == other.TypeMetatadataTokenId;
570+
public bool Equals(MethodId other) => MethodMetadataTokenId == other.MethodMetadataTokenId && TypeMetadataTokenId == other.TypeMetadataTokenId;
571571
public override bool Equals(object other) => other is MethodId methodId && Equals(methodId);
572-
public override int GetHashCode() => (int)(MethodMetatadataTokenId ^ TypeMetatadataTokenId);
572+
public override int GetHashCode() => (int)(MethodMetadataTokenId ^ TypeMetadataTokenId);
573573
}
574574
}

src/BenchmarkDotNet/Analysers/BaselineCustomAnalyzer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ protected override IEnumerable<Conclusion> AnalyseSummary(Summary summary)
1919
.Distinct()
2020
.ToArray();
2121

22-
var columNames = string.Join(", ", columns);
22+
var columnNames = string.Join(", ", columns);
2323

2424
foreach (var benchmarkCase in summary.BenchmarksCases)
2525
{
@@ -29,7 +29,7 @@ protected override IEnumerable<Conclusion> AnalyseSummary(Summary summary)
2929
continue;
3030

3131
var message = "A question mark '?' symbol indicates that it was not possible to compute the " +
32-
$"({columNames}) column(s) because the baseline value is too close to zero.";
32+
$"({columnNames}) column(s) because the baseline value is too close to zero.";
3333

3434
yield return Conclusion.CreateWarning(Id, message);
3535
}

src/BenchmarkDotNet/Configs/ImmutableConfig.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal ImmutableConfig(
3838
ImmutableHashSet<HardwareCounter> uniqueHardwareCounters,
3939
ImmutableHashSet<IDiagnoser> uniqueDiagnosers,
4040
ImmutableArray<IExporter> uniqueExporters,
41-
ImmutableHashSet<IAnalyser> unqueAnalyzers,
41+
ImmutableHashSet<IAnalyser> uniqueAnalyzers,
4242
ImmutableHashSet<IValidator> uniqueValidators,
4343
ImmutableHashSet<IFilter> uniqueFilters,
4444
ImmutableHashSet<BenchmarkLogicalGroupRule> uniqueRules,
@@ -55,7 +55,7 @@ internal ImmutableConfig(
5555
hardwareCounters = uniqueHardwareCounters;
5656
diagnosers = uniqueDiagnosers;
5757
exporters = uniqueExporters;
58-
analysers = unqueAnalyzers;
58+
analysers = uniqueAnalyzers;
5959
validators = uniqueValidators;
6060
filters = uniqueFilters;
6161
rules = uniqueRules;

src/BenchmarkDotNet/Configs/ImmutableConfigBuilder.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static ImmutableConfig Create(IConfig source)
4040
var uniqueHardwareCounters = source.GetHardwareCounters().ToImmutableHashSet();
4141
var uniqueDiagnosers = GetDiagnosers(source.GetDiagnosers(), uniqueHardwareCounters);
4242
var uniqueExporters = GetExporters(source.GetExporters(), uniqueDiagnosers);
43-
var unqueAnalyzers = GetAnalysers(source.GetAnalysers(), uniqueDiagnosers);
43+
var uniqueAnalyzers = GetAnalysers(source.GetAnalysers(), uniqueDiagnosers);
4444

4545
var uniqueValidators = GetValidators(source.GetValidators(), MandatoryValidators, source.Options);
4646

@@ -55,7 +55,7 @@ public static ImmutableConfig Create(IConfig source)
5555
uniqueHardwareCounters,
5656
uniqueDiagnosers,
5757
uniqueExporters,
58-
unqueAnalyzers,
58+
uniqueAnalyzers,
5959
uniqueValidators,
6060
uniqueFilters,
6161
uniqueRules,
@@ -69,15 +69,15 @@ public static ImmutableConfig Create(IConfig source)
6969
);
7070
}
7171

72-
private static ImmutableHashSet<IDiagnoser> GetDiagnosers(IEnumerable<IDiagnoser> diagnosers, ImmutableHashSet<HardwareCounter> uniqueHardwareCoutners)
72+
private static ImmutableHashSet<IDiagnoser> GetDiagnosers(IEnumerable<IDiagnoser> diagnosers, ImmutableHashSet<HardwareCounter> uniqueHardwareCounters)
7373
{
7474
var builder = ImmutableHashSet.CreateBuilder(new TypeComparer<IDiagnoser>());
7575

7676
foreach (var diagnoser in diagnosers)
7777
if (!builder.Contains(diagnoser))
7878
builder.Add(diagnoser);
7979

80-
if (!uniqueHardwareCoutners.IsEmpty && !diagnosers.OfType<IHardwareCountersDiagnoser>().Any())
80+
if (!uniqueHardwareCounters.IsEmpty && !diagnosers.OfType<IHardwareCountersDiagnoser>().Any())
8181
{
8282
// if users define hardware counters via [HardwareCounters] we need to dynamically load the right diagnoser
8383
var hardwareCountersDiagnoser = DiagnosersLoader.GetImplementation<IHardwareCountersDiagnoser>();

src/BenchmarkDotNet/ConsoleArguments/CommandLineOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public class CommandLineOptions
160160
public bool DisableLogFile { get; set; }
161161

162162
[Option("maxWidth", Required = false, HelpText = "Max paramter column width, the default is 20.")]
163-
public int? MaxParamterColumnWidth { get; set; }
163+
public int? MaxParameterColumnWidth { get; set; }
164164

165165
internal bool UserProvidedFilters => Filters.Any() || AttributeNames.Any() || AllCategories.Any() || AnyCategories.Any();
166166

src/BenchmarkDotNet/ConsoleArguments/ConfigParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ private static IConfig CreateConfig(CommandLineOptions options, IConfig globalCo
215215
config.Options = config.Options.Set(options.StopOnFirstError, ConfigOptions.StopOnFirstError);
216216
config.Options = config.Options.Set(options.DisableLogFile, ConfigOptions.DisableLogFile);
217217

218-
if (options.MaxParamterColumnWidth.HasValue)
219-
config.SummaryStyle = SummaryStyle.Default.WithMaxParameterColumnWidth(options.MaxParamterColumnWidth.Value);
218+
if (options.MaxParameterColumnWidth.HasValue)
219+
config.SummaryStyle = SummaryStyle.Default.WithMaxParameterColumnWidth(options.MaxParameterColumnWidth.Value);
220220

221221
return config;
222222
}

src/BenchmarkDotNet/Parameters/ParameterInstance.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ public class ParameterInstance
1414
[PublicAPI] public ParameterDefinition Definition { get; }
1515

1616
private readonly object value;
17-
private readonly int maxParamterColumnWidth;
17+
private readonly int maxParameterColumnWidth;
1818

1919
public ParameterInstance(ParameterDefinition definition, object value, SummaryStyle summaryStyle)
2020
{
2121
Definition = definition;
2222
this.value = value;
23-
maxParamterColumnWidth = summaryStyle?.MaxParamterColumnWidth ?? SummaryStyle.DefaultMaxParameterColumnWidth;
23+
maxParameterColumnWidth = summaryStyle?.MaxParameterColumnWidth ?? SummaryStyle.DefaultMaxParameterColumnWidth;
2424
}
2525

2626
public string Name => Definition.Name;
@@ -40,13 +40,13 @@ public string ToDisplayText()
4040
case null:
4141
return NullParameterTextRepresentation;
4242
case IParam parameter:
43-
return Trim(parameter.DisplayText, maxParamterColumnWidth);
43+
return Trim(parameter.DisplayText, maxParameterColumnWidth);
4444
// no trimming for types!
4545
case Type type:
4646
return type.IsNullable() ? $"{Nullable.GetUnderlyingType(type).GetDisplayName()}?" : type.GetDisplayName();
4747
}
4848

49-
return Trim(value.ToString(), maxParamterColumnWidth);
49+
return Trim(value.ToString(), maxParameterColumnWidth);
5050
}
5151

5252
public override string ToString() => ToDisplayText();

src/BenchmarkDotNet/Reports/SummaryStyle.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class SummaryStyle : IEquatable<SummaryStyle>
1313
public bool PrintUnitsInHeader { get; }
1414
public bool PrintUnitsInContent { get; }
1515
public bool PrintZeroValuesInContent { get; }
16-
public int MaxParamterColumnWidth { get; }
16+
public int MaxParameterColumnWidth { get; }
1717
public SizeUnit SizeUnit { get; }
1818
public TimeUnit TimeUnit { get; }
1919

@@ -27,7 +27,7 @@ public SummaryStyle(bool printUnitsInHeader, SizeUnit sizeUnit, TimeUnit timeUni
2727
SizeUnit = sizeUnit;
2828
TimeUnit = timeUnit;
2929
PrintZeroValuesInContent = printZeroValuesInContent;
30-
MaxParamterColumnWidth = maxParameterColumnWidth;
30+
MaxParameterColumnWidth = maxParameterColumnWidth;
3131
}
3232

3333
public SummaryStyle WithTimeUnit(TimeUnit timeUnit)
@@ -39,8 +39,8 @@ public SummaryStyle WithSizeUnit(SizeUnit sizeUnit)
3939
public SummaryStyle WithZeroMetricValuesInContent()
4040
=> new SummaryStyle(PrintUnitsInHeader, SizeUnit, TimeUnit, PrintUnitsInContent, printZeroValuesInContent: true);
4141

42-
public SummaryStyle WithMaxParameterColumnWidth(int maxParamterColumnWidth)
43-
=> new SummaryStyle(PrintUnitsInHeader, SizeUnit, TimeUnit, PrintUnitsInContent, PrintZeroValuesInContent, maxParamterColumnWidth);
42+
public SummaryStyle WithMaxParameterColumnWidth(int maxParameterColumnWidth)
43+
=> new SummaryStyle(PrintUnitsInHeader, SizeUnit, TimeUnit, PrintUnitsInContent, PrintZeroValuesInContent, maxParameterColumnWidth);
4444

4545
public bool Equals(SummaryStyle other)
4646
{
@@ -53,7 +53,7 @@ public bool Equals(SummaryStyle other)
5353
&& PrintZeroValuesInContent == other.PrintZeroValuesInContent
5454
&& Equals(SizeUnit, other.SizeUnit)
5555
&& Equals(TimeUnit, other.TimeUnit)
56-
&& MaxParamterColumnWidth == other.MaxParamterColumnWidth;
56+
&& MaxParameterColumnWidth == other.MaxParameterColumnWidth;
5757
}
5858

5959
public override bool Equals(object obj) => obj is SummaryStyle summary && Equals(summary);
@@ -67,7 +67,7 @@ public override int GetHashCode()
6767
hashCode = (hashCode * 397) ^ PrintZeroValuesInContent.GetHashCode();
6868
hashCode = (hashCode * 397) ^ (SizeUnit != null ? SizeUnit.GetHashCode() : 0);
6969
hashCode = (hashCode * 397) ^ (TimeUnit != null ? TimeUnit.GetHashCode() : 0);
70-
hashCode = (hashCode * 397) ^ MaxParamterColumnWidth;
70+
hashCode = (hashCode * 397) ^ MaxParameterColumnWidth;
7171
return hashCode;
7272
}
7373
}

0 commit comments

Comments
 (0)