diff options
author | 2016-04-04 08:19:06 +0100 | |
---|---|---|
committer | 2016-04-04 08:19:06 +0100 | |
commit | 84dfdab58499214df3be14395deb8fc3ff61f9c0 (patch) | |
tree | b0bfd25e74e28e6a166268f67a6521d0dfca1110 /server | |
parent | b3b6fe48f665500afc2bf9a51986fc1cc9f9fccc (diff) | |
download | coredns-84dfdab58499214df3be14395deb8fc3ff61f9c0.tar.gz coredns-84dfdab58499214df3be14395deb8fc3ff61f9c0.tar.zst coredns-84dfdab58499214df3be14395deb8fc3ff61f9c0.zip |
Cache elements of State
Cache the size and the do bit whenever someone asked for it. We can
probably add more:
PASS
BenchmarkStateDo-4 100000000 11.9 ns/op
BenchmarkStateSize-4 5000000 265 ns/op
ok github.com/miekg/coredns/middleware 2.828s
PASS
BenchmarkStateDo-4 1000000000 2.86 ns/op
BenchmarkStateSize-4 500000000 3.10 ns/op
ok github.com/miekg/coredns/middleware 5.032s
This PR also includes some testing cleanups as well.
Diffstat (limited to 'server')
0 files changed, 0 insertions, 0 deletions