Commit 50ab28aa authored by Miek Gieben's avatar Miek Gieben Committed by GitHub

mw/file: rename to BenchmarkFileLookup (#741)

In grafana we miss the context of where this is called, make the name
more descriptive.

Also test the GH webhook.
parent e039bbc3
...@@ -169,7 +169,7 @@ func TestLookupDNSSEC(t *testing.T) { ...@@ -169,7 +169,7 @@ func TestLookupDNSSEC(t *testing.T) {
} }
} }
func BenchmarkLookupDNSSEC(b *testing.B) { func BenchmarkFileLookupDNSSEC(b *testing.B) {
zone, err := Parse(strings.NewReader(dbMiekNLSigned), testzone, "stdin", 0) zone, err := Parse(strings.NewReader(dbMiekNLSigned), testzone, "stdin", 0)
if err != nil { if err != nil {
return return
......
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"testing" "testing"
) )
func BenchmarkParseInsert(b *testing.B) { func BenchmarkFileParseInsert(b *testing.B) {
for i := 0; i < b.N; i++ { for i := 0; i < b.N; i++ {
Parse(strings.NewReader(dbMiekENTNL), testzone, "stdin", 0) Parse(strings.NewReader(dbMiekENTNL), testzone, "stdin", 0)
} }
......
...@@ -154,7 +154,7 @@ func TestLookupNil(t *testing.T) { ...@@ -154,7 +154,7 @@ func TestLookupNil(t *testing.T) {
fm.ServeDNS(ctx, rec, m) fm.ServeDNS(ctx, rec, m)
} }
func BenchmarkLookup(b *testing.B) { func BenchmarkFileLookup(b *testing.B) {
zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0)
if err != nil { if err != nil {
return return
......
...@@ -100,7 +100,7 @@ func TestLookupDnsWithForcedTcp(t *testing.T) { ...@@ -100,7 +100,7 @@ func TestLookupDnsWithForcedTcp(t *testing.T) {
} }
} }
func BenchmarkLookupProxy(b *testing.B) { func BenchmarkProxyLookup(b *testing.B) {
t := new(testing.T) t := new(testing.T)
name, rm, err := test.TempFile(".", exampleOrg) name, rm, err := test.TempFile(".", exampleOrg)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment