From 72b5d8f50fcd68ea945383ce569ef2a662ebe4b0 Mon Sep 17 00:00:00 2001 From: tidwall Date: Mon, 4 Mar 2019 10:44:53 -0700 Subject: [PATCH] Add pprof comment --- cmd/tile38-server/main.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cmd/tile38-server/main.go b/cmd/tile38-server/main.go index d9df7628..4d1e8f82 100644 --- a/cmd/tile38-server/main.go +++ b/cmd/tile38-server/main.go @@ -42,12 +42,27 @@ var ( // TODO: Set to false in 2.* var httpTransport = true +//////////////////////////////////////////////////////////////////////////////// +// // Fire up a webhook test server by using the --webhook-http-consumer-port // for example // $ ./tile38-server --webhook-http-consumer-port 9999 // // The create hooks like such... // SETHOOK myhook http://localhost:9999/myhook NEARBY mykey FENCE POINT 33.5 -115.5 1000 +// +//////////////////////////////////////////////////////////////////////////////// +// +// Memory profiling - start the server with the -pprofport flag +// +// $ ./tile38-server -pprofport 6060 +// +// Then, at any point, from a different terminal execute: +// $ go tool pprof -svg http://localhost:6060/debug/pprof/heap > out.svg +// +// Load the SVG into a web browser to visualize the memory usage +// +//////////////////////////////////////////////////////////////////////////////// type hserver struct{}