MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / BenchmarkQueue_ParsePtr

Function BenchmarkQueue_ParsePtr

internal/utils/agents/queue_test.go:66–85  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

64}
65
66func BenchmarkQueue_ParsePtr(b *testing.B) {
67 var queue = agents.NewQueue()
68
69 for i := 0; i < b.N; i++ {
70 for _, s := range [][]string{
71 {"baiduspider-220-181-108-101.crawl.baidu.com.", "baidu"},
72 {"crawl-66-249-71-219.googlebot.com.", "google"},
73 {"msnbot-40-77-167-31.search.msn.com.", "bing"},
74 {"sogouspider-49-7-20-129.crawl.sogou.com.", "sogou"},
75 {"m13102.mail.163.com.", "youdao"},
76 {"yeurosport.pat1.tc2.yahoo.com.", "yahoo"},
77 {"shenmaspider-42-120-160-1.crawl.sm.cn.", "sm"},
78 {"93-158-161-39.spider.yandex.com.", "yandex"},
79 {"93.158.164.218-red.dhcp.yndx.net.", "yandex"},
80 {"25.bl.bot.semrush.com.", "semrush"},
81 } {
82 queue.ParsePtr(s[0])
83 }
84 }
85}

Callers

nothing calls this directly

Calls 2

NewQueueFunction · 0.92
ParsePtrMethod · 0.80

Tested by

no test coverage detected