Попытка внедрить statsd

This commit is contained in:
ErickSkrauch
2016-08-26 22:08:53 +03:00
parent 34179ae1fe
commit a0d940f8cd
6 changed files with 33 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ import (
)
func Textures(w http.ResponseWriter, r *http.Request) {
services.Stats.Incr("textures-requests", 1)
username := tools.ParseUsername(mux.Vars(r)["username"])
log.Println("request textures for username " + username)

View File

@@ -4,6 +4,7 @@ import (
"github.com/mediocregopher/radix.v2/pool"
"github.com/streadway/amqp"
"github.com/gorilla/mux"
"github.com/quipo/statsd"
)
var Router *mux.Router
@@ -13,3 +14,5 @@ var RedisPool *pool.Pool
var RabbitMQChannel *amqp.Channel
var RootFolder string
var Stats *statsd.StatsdBuffer