renew benchmark
This commit is contained in:
parent
9ddf8a8939
commit
3d88269c95
|
@ -79,16 +79,19 @@ maxcount = 100000
|
||||||
|
|
||||||
## Benchmak
|
## Benchmak
|
||||||
|
|
||||||
|
|
||||||
|
__Debug close__
|
||||||
|
|
||||||
```
|
```
|
||||||
$ go test -bench=.
|
$ go test -bench=.
|
||||||
|
|
||||||
testing: warning: no tests to run
|
testing: warning: no tests to run
|
||||||
PASS
|
PASS
|
||||||
BenchmarkDig-4 5000 435141 ns/op
|
BenchmarkDig-4 10000 202732 ns/op
|
||||||
ok _/Users/kenshin/workspace/godns 2.270s
|
ok _/Users/kenshin/workspace/gogo/godns 2.489s
|
||||||
```
|
```
|
||||||
|
|
||||||
The result : 2200 queries/per second
|
The result : 4032 queries/per second
|
||||||
|
|
||||||
The enviroment of test:
|
The enviroment of test:
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ Title = "GODNS"
|
||||||
Version = "0.1.1"
|
Version = "0.1.1"
|
||||||
Author = "kenshin"
|
Author = "kenshin"
|
||||||
|
|
||||||
Debug = true
|
Debug = false
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
|
@ -16,7 +16,7 @@ resolv-file = "/etc/resolv.conf"
|
||||||
timeout = 5 # 5 seconds
|
timeout = 5 # 5 seconds
|
||||||
|
|
||||||
[redis]
|
[redis]
|
||||||
host = "kenshinx.me"
|
host = "127.0.0.1"
|
||||||
port = 6379
|
port = 6379
|
||||||
db = 0
|
db = 0
|
||||||
password =""
|
password =""
|
||||||
|
@ -35,7 +35,7 @@ maxcount = 100000
|
||||||
|
|
||||||
[hosts]
|
[hosts]
|
||||||
#If set false, will not query hosts file and redis hosts record
|
#If set false, will not query hosts file and redis hosts record
|
||||||
enable = true
|
enable = false
|
||||||
host-file = "/etc/hosts"
|
host-file = "/etc/hosts"
|
||||||
redis-key = "godns:hosts"
|
redis-key = "godns:hosts"
|
||||||
ttl = 600
|
ttl = 600
|
||||||
|
|
Loading…
Reference in New Issue