MCPcopy Create free account
hub / github.com/github/gh-aw / BenchmarkExtractDomainFromURL

Function BenchmarkExtractDomainFromURL

pkg/stringutil/urls_test.go:120–135  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

118}
119
120func BenchmarkExtractDomainFromURL(b *testing.B) {
121 testCases := []string{
122 "https://api.github.com/repos",
123 "http://example.com:8080/path",
124 "mcp.example.com",
125 "github.com:443",
126 }
127
128 for _, tc := range testCases {
129 b.Run(tc, func(b *testing.B) {
130 for range b.N {
131 _ = ExtractDomainFromURL(tc)
132 }
133 })
134 }
135}
136
137func TestNormalizeGitHubHostURL(t *testing.T) {
138 tests := []struct {

Callers

nothing calls this directly

Calls 2

ExtractDomainFromURLFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected