Increase querylog size from 1000 to 10000 -- that'll use 32MB of memory.

This commit is contained in:
Eugene Bujak 2018-10-03 22:25:55 +03:00
parent 7d7360c700
commit 57ade2c3c3
1 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@ import (
"github.com/zfjagann/golang-ring"
)
const logBufferCap = 10000
var logBuffer = ring.Ring{}
type logEntry struct {
@ -28,7 +30,7 @@ type logEntry struct {
}
func init() {
logBuffer.SetCapacity(1000)
logBuffer.SetCapacity(logBufferCap)
}
func logRequest(question *dns.Msg, answer *dns.Msg, result dnsfilter.Result, elapsed time.Duration, ip string) {