mochengqian commented on PR #965:
URL: https://github.com/apache/dubbo-go-pixiu/pull/965#issuecomment-4700384329

   已有benchmark:
   `BenchmarkCooldown_EndpointInCooldown` (added in this PR), 100 LLM endpoints 
each with an API key, on the hot `endpointInCooldown` path:
   
   | | ns/op | B/op | allocs/op |
   |---|---|---|---|
   | before | 300.0 | 168 | 6 |
   | after | 163.2 | 40 | 3 |
   
   补充benchmark @AlexStocks :
   验证长时间稳定性 (`-benchtime=10s`)输出:
   BenchmarkCooldown_EndpointInCooldown-10   71128392   166.6 ns/op   40 B/op   
3 allocs/op
   结果:71M+迭代运行稳定
   
   验证多核并发 (`-cpu=1,2,4,8`)输出:
   BenchmarkCooldown_EndpointInCooldown     6498583   187.3 ns/op   40 B/op   3 
allocs/op
   BenchmarkCooldown_EndpointInCooldown-2   7174485   167.5 ns/op   40 B/op   3 
allocs/op
   BenchmarkCooldown_EndpointInCooldown-4   7150099   167.9 ns/op   40 B/op   3 
allocs/op
   BenchmarkCooldown_EndpointInCooldown-8   7156354   167.5 ns/op   40 B/op   3 
allocs/op
   结果:2-8核心表现一致
   
   验证内存:
   命令: $ go tool pprof -top -alloc_objects mem.out ,输出:
    
    12026039 62.36%  SocketAddress.GetAddress
      7143532 37.04%  fmt.Sprintf  
   
   结果:本PR消除的hex编码部分的fmt.Sprintf得到的优化,已验证


-- 
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