Ejemplo n.º 1
0
func main() {

	pinba = gopinba.New(&gopinba.Options{PinbaHost: "127.0.0.1", PinbaPort: 30002, ServerName: "go-web.local"})

	http.HandleFunc("/", simpleRequest)
	http.HandleFunc("/timers/", requestWithTimers)
	http.ListenAndServe(":8080", nil)
}
Ejemplo n.º 2
0
func main() {

	pinba := gopinba.New(&gopinba.Options{PinbaHost: "127.0.0.1", PinbaPort: 30002})

	request := pinba.Request()

	for i := 0; i < 100; i++ {

		timer := request.TimerStart(&gopinba.Tags{"group": "cli"})

		// exec

		request.TimerStop(timer)
	}

	pinba.Flush(request)
}