Option Strict On
Option Explicit On

Imports System
Imports Nexamas.UI.Performance

Namespace Nexamas.UI.Quality

    ''' <summary>
    ''' Commercial-readiness evidence gate for measured product-control runtime benchmark coverage.
    ''' It proves the official proof paths are measurable and complete, without enforcing marketing performance thresholds.
    ''' </summary>
    Friend NotInheritable Class MASMeasuredRuntimeBenchmarkGate

        Private Sub New()
        End Sub

        Friend Shared Function Passes() As Boolean
            Dim report As MASProductControlRuntimeBenchmarkReport = BuildReport()
            Return report IsNot Nothing AndAlso report.ReadyForCommercialEvidence
        End Function

        Friend Shared Function BuildReport() As MASProductControlRuntimeBenchmarkReport
            Try
                Return MASProductControlRuntimeBenchmarkRunner.RunDefault()
            Catch ex As Exception
                Nexamas.UI.Diagnostics.MASExceptionSilencer.SwallowDiagnosticOnly(ex, "MASMeasuredRuntimeBenchmarkGate.BuildReport")
                Return Nothing
            End Try
        End Function

    End Class

End Namespace
