@@ -27,12 +27,13 @@ type ScenarioResources struct {
2727 JobBaseName string
2828}
2929
30- // SetupBenchmarkScenario creates the common infrastructure for a benchmark scenario :
30+ // setupBenchmarkScenario creates fresh benchmark infrastructure from scratch :
3131// model service deployment, service, ServiceMonitor, VariantAutoscaling, and HPA.
3232// It waits for the deployment to be ready, VA to stabilize, external metrics API to
3333// serve wva_desired_replicas, and Prometheus to scrape simulator metrics.
3434// Cleanup is registered via DeferCleanup.
35- func SetupBenchmarkScenario (res ScenarioResources ) {
35+ func setupBenchmarkScenario (res ScenarioResources ) {
36+ GinkgoHelper ()
3637 By ("Creating model service deployment" )
3738 err := fixtures .EnsureModelService (ctx , k8sClient , benchCfg .LLMDNamespace , res .ModelService , res .PoolName , benchCfg .ModelID , benchCfg .UseSimulator , benchCfg .MaxNumSeqs )
3839 Expect (err ).NotTo (HaveOccurred (), "Failed to create model service" )
@@ -131,9 +132,10 @@ func SetupBenchmarkScenario(res ScenarioResources) {
131132 GinkgoWriter .Println ("Scenario setup completed — metrics pipeline verified" )
132133}
133134
134- // CaptureResultsAndGrafana captures Grafana snapshots (if enabled) and writes benchmark
135+ // captureResultsAndGrafana captures Grafana snapshots (if enabled) and writes benchmark
135136// results to the configured output file. Call this from AfterAll.
136- func CaptureResultsAndGrafana (results * BenchmarkResults , scenarioStart time.Time ) {
137+ func captureResultsAndGrafana (results * BenchmarkResults , scenarioStart time.Time ) {
138+ GinkgoHelper ()
137139 results .TotalDurationSec = time .Since (scenarioStart ).Seconds ()
138140
139141 if grafanaClient != nil && benchCfg .GrafanaEnabled {
@@ -183,8 +185,8 @@ func CaptureResultsAndGrafana(results *BenchmarkResults, scenarioStart time.Time
183185 GinkgoWriter .Printf ("Results: %s\n " , string (data ))
184186}
185187
186- // GatewayTargetURL returns the full URL for load generation through the Gateway stack.
187- func GatewayTargetURL () string {
188+ // gatewayTargetURL returns the full URL for load generation through the Gateway stack.
189+ func gatewayTargetURL () string {
188190 gwHost := fmt .Sprintf ("%s.%s.svc.cluster.local" , benchCfg .GatewayServiceName , benchCfg .LLMDNamespace )
189191 return fmt .Sprintf ("http://%s:%d/v1/completions" , gwHost , benchCfg .GatewayServicePort )
190192}
0 commit comments