From 3d88269c959a1fc2be601fb41c5f9637c2167b60 Mon Sep 17 00:00:00 2001 From: kenshin Date: Sat, 27 Jul 2013 00:10:17 +0800 Subject: [PATCH] renew benchmark --- README.MD | 9 ++++++--- godns.conf | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.MD b/README.MD index 0ddcbb7..7ad761a 100644 --- a/README.MD +++ b/README.MD @@ -79,16 +79,19 @@ maxcount = 100000 ## Benchmak + +__Debug close__ + ``` $ go test -bench=. testing: warning: no tests to run PASS -BenchmarkDig-4 5000 435141 ns/op -ok _/Users/kenshin/workspace/godns 2.270s +BenchmarkDig-4 10000 202732 ns/op +ok _/Users/kenshin/workspace/gogo/godns 2.489s ``` -The result : 2200 queries/per second +The result : 4032 queries/per second The enviroment of test: diff --git a/godns.conf b/godns.conf index ff68eed..28cc3ee 100644 --- a/godns.conf +++ b/godns.conf @@ -5,7 +5,7 @@ Title = "GODNS" Version = "0.1.1" Author = "kenshin" -Debug = true +Debug = false [server] host = "127.0.0.1" @@ -16,7 +16,7 @@ resolv-file = "/etc/resolv.conf" timeout = 5 # 5 seconds [redis] -host = "kenshinx.me" +host = "127.0.0.1" port = 6379 db = 0 password ="" @@ -35,7 +35,7 @@ maxcount = 100000 [hosts] #If set false, will not query hosts file and redis hosts record -enable = true +enable = false host-file = "/etc/hosts" redis-key = "godns:hosts" ttl = 600