Skip to content

Commit

Permalink
Log query counts once a minute, bump version to 2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
abh committed Sep 9, 2012
1 parent 3f66e93 commit 1b90173
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#go get -v
REVISION=`git rev-parse --short=8 HEAD`
REVISION=`git rev-parse --short=6 HEAD`
echo $REVISION > REVISION
go build -ldflags "-X main.gitVersion $REVISION" -v
go install
2 changes: 1 addition & 1 deletion geodns.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"
)

var VERSION string = "2.0.1"
var VERSION string = "2.0.2"
var gitVersion string
var serverId string

Expand Down
5 changes: 4 additions & 1 deletion monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ import (
)

func monitor() {
lastQueryCount := qCounter
for {
log.Println("goroutines", runtime.NumGoroutine())
newQueries := qCounter - lastQueryCount
lastQueryCount = qCounter
log.Println("goroutines", runtime.NumGoroutine(), "queries", newQueries)
time.Sleep(60 * time.Second)
}
}

0 comments on commit 1b90173

Please sign in to comment.