Copilot commented on code in PR #965:
URL: https://github.com/apache/dubbo-go-pixiu/pull/965#discussion_r3371159144


##########
pkg/filter/llm/proxy/filter_test.go:
##########
@@ -412,3 +412,26 @@ func testLLMEndpoint(id string, port int) *model.Endpoint {
                },
        }
 }
+
+func BenchmarkCooldown_EndpointInCooldown(b *testing.B) {
+       const clusterName = "llm-cooldown-bench"
+       const endpointCount = 100
+       store := newCooldownStore()
+       executor := &RequestExecutor{
+               clusterName: clusterName,
+               cooldowns:   store,
+       }
+       endpoints := make([]*model.Endpoint, endpointCount)
+       for i := range endpoints {
+               endpoint := testLLMEndpoint(fmt.Sprintf("ep-%d", i), 19000+i)
+               endpoint.LLMMeta.APIKey = fmt.Sprintf("api-key-%d", i)
+               endpoints[i] = endpoint

Review Comment:
   This benchmark relies on the endpoint cooldown TTL not expiring during the 
run; with the current 60s `HealthCheckInterval`, running with a long 
`-benchtime` (or under a slow environment) could cause entries to expire 
mid-benchmark and shift the measured path (including deletions/logging), making 
results unstable.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to