mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-26 13:11:53 +08:00
性能优化: 热路径零分配, 自适应池CAS无锁化, 锁外计算
- port_scan: fmt.Sprintf→JoinHostPort+fmtPort零分配地址格式化 (2.5x) - port_scan: strings.ToLower→containsFold零分配大小写不敏感匹配 (2.5x) - port_scan: slidingWindowSchedule修复semaphore泄漏bug - service_probe: readFromConn预分配4KB缓冲区消除扩容 - adaptive_pool: maybeAdjust用atomic CAS代替持锁检查, 99%免锁 - adaptive_timeout: Timeout锁外计算均值/标准差, 只锁缓存更新 - 新增perf_bench_test.go基准测试验证所有优化
This commit is contained in:
@@ -662,7 +662,7 @@ func TestIsResourceExhaustedError_EdgeCases(t *testing.T) {
|
||||
{
|
||||
name: "大小写混合",
|
||||
err: fmt.Errorf("Too Many Open Files"),
|
||||
expected: false, // 当前实现区分大小写
|
||||
expected: true, // containsFold 不区分大小写
|
||||
},
|
||||
{
|
||||
name: "错误信息包含但不完全匹配",
|
||||
|
||||
Reference in New Issue
Block a user