Merged
Show file tree
Hide file tree
Changes from all commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Failed to load files.
Original file line numberDiff line numberDiff line change
Expand Up@@ -41,7 +41,7 @@ public BenchmarkResult(BenchmarkReport benchmarkReport)
Name = Categories.Contains(DriverBenchmarkCategory.BulkWriteBench)
? benchmarkReport.BenchmarkCase.Descriptor.WorkloadMethod.Name
: benchmarkReport.BenchmarkCase.Descriptor.Type.Name;

Copy link
Contributor Author

@adelinowona adelinowona Jun 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

git blame has difficulties blaming this type of space changes. Git fundamentally sees this as creating a new empty line without spaces and deleting an old line with spaces rather than simply modifying the existing line. As such, git blame will fail to ignore this change.

dataSetSize = (int)benchmarkReport.BenchmarkCase.Parameters["BenchmarkDataSetSize"];
}

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,7 @@ public static class DriverBenchmarkCategory
public const string ReadBench = "ReadBench";
public const string SingleBench = "SingleBench";
public const string WriteBench = "WriteBench";

// not included in AllCategories as it's not part of the benchmarking spec
public const string BulkWriteBench = "BulkWriteBench";

Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,7 @@ public class LargeDocBulkInsertBenchmark
private BsonDocument[] _largeDocuments;
private InsertOneModel<BsonDocument>[] _collectionBulkWriteInsertModels;
private BulkWriteInsertOneModel<BsonDocument>[] _clientBulkWriteInsertModels;

private static readonly CollectionNamespace __collectionNamespace =
CollectionNamespace.FromFullName($"{MongoConfiguration.PerfTestDatabaseName}.{MongoConfiguration.PerfTestCollectionName}");

Expand DownExpand Up@@ -63,13 +63,13 @@ public void InsertManyLargeBenchmark()
{
_collection.InsertMany(_largeDocuments, new());
}

[Benchmark]
public void LargeDocCollectionBulkWriteInsertBenchmark()
{
_collection.BulkWrite(_collectionBulkWriteInsertModels, new());
}

[Benchmark]
public void LargeDocClientBulkWriteInsertBenchmark()
{
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -62,13 +62,13 @@ public void InsertManySmallBenchmark()
{
_collection.InsertMany(_smallDocuments, new());
}

[Benchmark]
public void SmallDocCollectionBulkWriteInsertBenchmark()
{
_collection.BulkWrite(_collectionBulkWriteInsertModels, new());
}

[Benchmark]
public void SmallDocClientBulkWriteInsertBenchmark()
{
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,7 @@ namespace MongoDB.Bson
/// </summary>
public class DuplicateBsonMemberMapAttributeException : BsonException
{
// constructors
// constructors
/// <summary>
/// Initializes a new instance of the <see cref="DuplicateBsonMemberMapAttributeException" /> class.
/// </summary>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -76,7 +76,7 @@ public UTF8Encoding Encoding
}

/// <summary>
/// Gets or sets whether to fix occurrences of the old binary subtype on input.
/// Gets or sets whether to fix occurrences of the old binary subtype on input.
/// </summary>
public bool FixOldBinarySubTypeOnInput
{
Expand All@@ -89,7 +89,7 @@ public bool FixOldBinarySubTypeOnInput
}

/// <summary>
/// Gets or sets whether to fix occurrences of the old representation of DateTime.MaxValue on input.
/// Gets or sets whether to fix occurrences of the old representation of DateTime.MaxValue on input.
/// </summary>
public bool FixOldDateTimeMaxValueOnInput
{
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -572,7 +572,7 @@ public override void WriteCString(string value)
{
// Compare to 128 to preserve original behavior
const int maxLengthToUseCStringUtf8EncodingWith = 128;

if (maxLength <= maxLengthToUseCStringUtf8EncodingWith)
{
using var rentedBuffer = ThreadStaticBuffer.RentBuffer(maxLengthToUseCStringUtf8EncodingWith);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -111,7 +111,7 @@ TExpectedItem[] AsTypedArrayOrThrow<TExpectedItem>()
return result;
}
}

private static float[] ReadSinglesArrayLittleEndian(ReadOnlySpan<byte> span)
{
if ((span.Length & 3) != 0)
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -39,7 +39,7 @@ public static byte[] WriteToBytes<TItem>(ReadOnlySpan<TItem> vectorData, BinaryV
switch (binaryVectorDataType)
{
case BinaryVectorDataType.Float32:
var length = vectorData.Length * 4;
var length = vectorData.Length * 4;
var result = new byte[2 + length];
result[0] = (byte)binaryVectorDataType;
result[1] = padding;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -38,7 +38,7 @@ private BsonSerializationContext(

// public properties
/// <summary>
/// Gets a function that, when executed, will indicate whether the type
/// Gets a function that, when executed, will indicate whether the type
/// is a dynamic type.
/// </summary>
public Func<Type, bool> IsDynamicType
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -116,8 +116,8 @@ public static void Register(string name, IConventionPack conventions, Func<Type,
/// Removes the conventions specified by the given name.
/// </summary>
/// <param name="name">The name.</param>
/// <remarks>Removing a convention allows the removal of the special __defaults__ conventions
/// and the __attributes__ conventions for those who want to completely customize the
/// <remarks>Removing a convention allows the removal of the special __defaults__ conventions
/// and the __attributes__ conventions for those who want to completely customize the
/// experience.</remarks>
public static void Remove(string name)
{
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@
namespace MongoDB.Bson.Serialization.IdGenerators
{
/// <summary>
/// A GUID generator that generates GUIDs in ascending order. To enable
/// A GUID generator that generates GUIDs in ascending order. To enable
/// an index to make use of the ascending nature make sure to use
/// <see cref="GuidRepresentation.Standard">GuidRepresentation.Standard</see>
/// as the storage representation.
Expand DownExpand Up@@ -62,7 +62,7 @@ public static AscendingGuidGenerator Instance
/// Generates an ascending Guid for a document. Consecutive invocations
/// should generate Guids that are ascending from a MongoDB perspective
/// </summary>
/// <param name="container">The container of the document (will be a
/// <param name="container">The container of the document (will be a
/// MongoCollection when called from the driver). </param>
/// <param name="document">The document it was generated for.</param>
/// <returns>A Guid.</returns>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,7 +22,7 @@ namespace MongoDB.Bson.Serialization.Serializers
/// Serializer for <see cref="ExpandoObject"/>.
/// </summary>
/// <remarks>
/// The use of <see cref="ExpandoObject"/> will serialize any <see cref="List{Object}"/> without type information.
/// The use of <see cref="ExpandoObject"/> will serialize any <see cref="List{Object}"/> without type information.
/// To get the best experience out of using an <see cref="ExpandoObject"/>, any member wanting to be used
/// as an array should use <see cref="List{Object}"/>.
/// </remarks>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -179,7 +179,7 @@ public IEnumerableDeserializingAsCollectionSerializer<TIEnumerable, TItem, TColl
}

// explicit interface implementations
IBsonSerializer IChildSerializerConfigurable.ChildSerializer => ItemSerializer;
IBsonSerializer IChildSerializerConfigurable.ChildSerializer => ItemSerializer;

IBsonSerializer IChildSerializerConfigurable.WithChildSerializer(IBsonSerializer childSerializer)
=> WithItemSerializer((IBsonSerializer<TItem>)childSerializer);
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,7 +19,7 @@ namespace MongoDB.Driver.Authentication.Gssapi.Sspi
/// Flags for EncryptMessage.
/// </summary>
/// <remarks>
/// See the fQOP parameter at
/// See the fQOP parameter at
/// http://msdn.microsoft.com/en-us/library/windows/desktop/aa375378(v=vs.85).aspx.
/// </remarks>
internal enum EncryptQualityOfProtection : uint
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@ namespace MongoDB.Driver.Authentication
/// "SCRAM is a SASL mechanism whose client response and server challenge
/// messages are text-based messages containing one or more attribute-
/// value pairs separated by commas. Each attribute has a one-letter
/// name."
/// name."
/// </summary>
internal static class SaslMapParser
{
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -141,7 +141,7 @@ private static string SaslPrep(string str, bool allowUnassigned)

/// <summary>
/// Return true if the given <paramref name="ch"/> is an ASCII control character as defined by
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-C.2.1">RFC 3454, Appendix C.2.1</a>.
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-C.2.1">RFC 3454, Appendix C.2.1</a>.
/// </summary>
/// <param name="ch">The character.</param>
/// <returns>Whether the given character is an ASCII control character.</returns>
Expand DownExpand Up@@ -187,7 +187,7 @@ private static int CharCount(int codepoint)

/// <summary>
/// Return true if the given <paramref name="codepoint"/> is inappropriate for canonical representation
/// characters as defined by <a href="https://tools.ietf.org/html/rfc3454#appendix-C.7">RFC 3454, Appendix C.7</a>.
/// characters as defined by <a href="https://tools.ietf.org/html/rfc3454#appendix-C.7">RFC 3454, Appendix C.7</a>.
/// </summary>
/// <param name="codepoint">The Unicode character's codepoint.</param>
/// <returns>True if the codepoint is inappropriate for canonical.</returns>
Expand DownExpand Up@@ -647,7 +647,7 @@ private static bool IsSurrogateCodepoint(int codepoint)

/// <summary>
/// Return true if the given <paramref name="ch"/> is a "commonly mapped to nothing" character as defined by
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-B.1">RFC 3454, Appendix B.1</a>.
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-B.1">RFC 3454, Appendix B.1</a>.
/// </summary>
/// <param name="ch">The character.</param>
/// <returns>Whether the given character is a "commonly mapped to nothing" character.</returns>
Expand All@@ -669,7 +669,7 @@ private static bool MappedToNothing(char ch)

/// <summary>
/// Return true if the given <paramref name="codepoint"/> is a non-ASCII control character as defined by
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-C.2.2">RFC 3454, Appendix C.2.2</a>.
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-C.2.2">RFC 3454, Appendix C.2.2</a>.
/// </summary>
/// <param name="codepoint">The Unicode character's codepoint.</param>
/// <returns>Whether the given character is a non-ASCII control character.</returns>
Expand All@@ -695,7 +695,7 @@ private static bool NonAsciiControl(int codepoint)

/// <summary>
/// Return true if the given <paramref name="ch"/> is a non-ASCII space character as defined by
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-C.1.2">RFC 3454, Appendix C.1.2</a>.
/// <a href="https://tools.ietf.org/html/rfc3454#appendix-C.1.2">RFC 3454, Appendix C.1.2</a>.
/// </summary>
/// <param name="ch">The character.</param>
/// <returns>Whether the given character is a non-ASCII space character.</returns>
Expand DownExpand Up@@ -752,7 +752,7 @@ private static bool PrivateUse(int codepoint)

/// <summary>
/// Return true if the given <paramref name="codepoint"/> is a prohibited character as defined by
///<a href="https://tools.ietf.org/html/rfc4013#section-2.3">RFC 4013, Section 2.3</a>.
///<a href="https://tools.ietf.org/html/rfc4013#section-2.3">RFC 4013, Section 2.3</a>.
/// </summary>
/// <param name="codepoint">The Unicode character's codepoint.</param>
/// <returns>Whether the codepoint is a prohibited character.</returns>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,7 +79,7 @@ public bool Equals(ElectionId other)
/// Returns a hash code for this instance.
/// </summary>
/// <returns>
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
/// </returns>
public override int GetHashCode()
{
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,7 +20,7 @@ namespace MongoDB.Driver.Core.Clusters
internal interface IClusterClock
{
BsonDocument ClusterTime { get; }

void AdvanceClusterTime(BsonDocument newClusterTime);
}
}
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,11 +33,11 @@ public enum CompressorType
/// </summary>
Snappy = 1,
/// <summary>
/// The content of the message is compressed using zlib.
/// The content of the message is compressed using zlib.
/// </summary>
Zlib = 2,
/// <summary>
/// The content of the message is compressed using zstandard.
/// The content of the message is compressed using zstandard.
/// </summary>
ZStandard = 3
}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,7 @@ namespace MongoDB.Driver.Core.Compression
{
/// <summary>
/// Compressor according to the zlib algorithm.
/// </summary>
/// </summary>
internal sealed class ZlibCompressor : ICompressor
{
private readonly CompressionLevel _compressionLevel;
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -50,7 +50,7 @@ private static IReadOnlyList<T> EnumeratorToList(IEnumerator<T> enumerator)
/// Initializes a new instance of the <see cref="BatchableSource{T}"/> class.
/// </summary>
/// <remarks>
/// Use this overload when you know the batch is small and won't have to be broken up into sub-batches.
/// Use this overload when you know the batch is small and won't have to be broken up into sub-batches.
/// In that case using this overload is simpler than using an enumerator and using the other constructor.
/// </remarks>
/// <param name="batch">The single batch.</param>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,7 +56,7 @@ public SemaphoreSlimRequest(SemaphoreSlim semaphore, CancellationToken cancellat
/// </value>
public Task Task => _task;

// public methods
// public methods
/// <inheritdoc/>
public void Dispose()
{
Expand Down
Loading