Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit b4fc66feb6
3353 changed files with 88254 additions and 1590657 deletions

View File

@@ -2,11 +2,13 @@ using System.Text;
using StellaOps.Bench.ScannerAnalyzers.Baseline;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Bench.ScannerAnalyzers.Tests;
public sealed class BaselineLoaderTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task LoadAsync_ReadsCsvIntoDictionary()
{
var csv = """

View File

@@ -4,11 +4,14 @@ using StellaOps.Bench.ScannerAnalyzers.Baseline;
using StellaOps.Bench.ScannerAnalyzers.Reporting;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Bench.ScannerAnalyzers.Tests;
public sealed class BenchmarkJsonWriterTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public async Task WriteAsync_EmitsMetadataAndScenarioDetails()
{
var metadata = new BenchmarkJsonMetadata("1.0", DateTimeOffset.Parse("2025-10-23T12:00:00Z"), "abc123", "ci");

View File

@@ -3,11 +3,13 @@ using StellaOps.Bench.ScannerAnalyzers.Baseline;
using StellaOps.Bench.ScannerAnalyzers.Reporting;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Bench.ScannerAnalyzers.Tests;
public sealed class BenchmarkScenarioReportTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void RegressionRatio_ComputedWhenBaselinePresent()
{
var result = new ScenarioResult(
@@ -36,7 +38,8 @@ public sealed class BenchmarkScenarioReportTests
Assert.Contains("+33.3%", report.BuildRegressionFailureMessage());
}
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void RegressionRatio_NullWhenBaselineMissing()
{
var result = new ScenarioResult(

View File

@@ -3,11 +3,13 @@ using StellaOps.Bench.ScannerAnalyzers.Baseline;
using StellaOps.Bench.ScannerAnalyzers.Reporting;
using Xunit;
using StellaOps.TestKit;
namespace StellaOps.Bench.ScannerAnalyzers.Tests;
public sealed class PrometheusWriterTests
{
[Fact]
[Trait("Category", TestCategories.Unit)]
[Fact]
public void Write_EmitsMetricsForScenario()
{
var result = new ScenarioResult(

View File

@@ -22,5 +22,6 @@
<ItemGroup>
<ProjectReference Include="..\StellaOps.Bench.ScannerAnalyzers\StellaOps.Bench.ScannerAnalyzers.csproj" />
<ProjectReference Include="../../../../__Libraries/StellaOps.TestKit/StellaOps.TestKit.csproj" />
</ItemGroup>
</Project>