Fix audit findings for coverage, architecture checks, and XML docs
This commit is contained in:
@@ -15,6 +15,9 @@ namespace ZB.MOM.WW.CBDD.Tests.Benchmark;
|
||||
[JsonExporterAttribute.Full]
|
||||
public class CompactionBenchmarks
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the number of documents used per benchmark iteration.
|
||||
/// </summary>
|
||||
[Params(2_000)]
|
||||
public int DocumentCount { get; set; }
|
||||
|
||||
@@ -25,6 +28,9 @@ public class CompactionBenchmarks
|
||||
private DocumentCollection<Person> _collection = null!;
|
||||
private List<ObjectId> _insertedIds = [];
|
||||
|
||||
/// <summary>
|
||||
/// Prepares benchmark state and seed data for each iteration.
|
||||
/// </summary>
|
||||
[IterationSetup]
|
||||
public void Setup()
|
||||
{
|
||||
@@ -56,6 +62,9 @@ public class CompactionBenchmarks
|
||||
_storage.Checkpoint();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleans up benchmark resources and temporary files after each iteration.
|
||||
/// </summary>
|
||||
[IterationCleanup]
|
||||
public void Cleanup()
|
||||
{
|
||||
@@ -66,6 +75,10 @@ public class CompactionBenchmarks
|
||||
if (File.Exists(_walPath)) File.Delete(_walPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Benchmarks reclaimed file bytes reported by offline compaction.
|
||||
/// </summary>
|
||||
/// <returns>The reclaimed file byte count.</returns>
|
||||
[Benchmark(Baseline = true)]
|
||||
[BenchmarkCategory("Compaction_Offline")]
|
||||
public long OfflineCompact_ReclaimedBytes()
|
||||
@@ -81,6 +94,10 @@ public class CompactionBenchmarks
|
||||
return stats.ReclaimedFileBytes;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Benchmarks tail bytes truncated by offline compaction.
|
||||
/// </summary>
|
||||
/// <returns>The truncated tail byte count.</returns>
|
||||
[Benchmark]
|
||||
[BenchmarkCategory("Compaction_Offline")]
|
||||
public long OfflineCompact_TailBytesTruncated()
|
||||
|
||||
Reference in New Issue
Block a user