MCPcopy Index your code
hub / github.com/uber/aresdb / startDebugServer

Method startDebugServer

datanode/datanode.go:256–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

254}
255
256func (d *dataNode) startDebugServer() {
257 debugRouter := mux.NewRouter()
258 debugRouter.PathPrefix("/node_modules/").Handler(d.handlers.nodeModuleHandler)
259 debugRouter.PathPrefix("/static/").Handler(d.handlers.debugStaticHandler)
260 debugRouter.HandleFunc("/debug/pprof/cmdline", http.HandlerFunc(pprof.Cmdline))
261 debugRouter.HandleFunc("/debug/pprof/profile", http.HandlerFunc(pprof.Profile))
262 debugRouter.HandleFunc("/debug/pprof/symbol", http.HandlerFunc(pprof.Symbol))
263 debugRouter.HandleFunc("/debug/pprof/trace", http.HandlerFunc(pprof.Trace))
264 debugRouter.PathPrefix("/debug/pprof/").Handler(http.HandlerFunc(pprof.Index))
265
266 d.handlers.debugHandler.Register(debugRouter.PathPrefix("/dbg").Subrouter())
267 d.handlers.schemaHandler.RegisterForDebug(debugRouter.PathPrefix("/schema").Subrouter())
268
269 d.opts.InstrumentOptions().Logger().Infof("Starting HTTP server on dbg-port %d", d.opts.ServerConfig().DebugPort)
270 d.opts.InstrumentOptions().Logger().Fatal(http.ListenAndServe(fmt.Sprintf(":%d", d.opts.ServerConfig().DebugPort), debugRouter))
271}
272
273func (d *dataNode) startTableAdditionWatch() {
274 shardOwnershipEvents, done, err := d.metaStore.WatchShardOwnershipEvents()

Callers 1

OpenMethod · 0.95

Calls 7

RegisterForDebugMethod · 0.80
InfofMethod · 0.65
LoggerMethod · 0.65
InstrumentOptionsMethod · 0.65
ServerConfigMethod · 0.65
FatalMethod · 0.65
RegisterMethod · 0.45

Tested by

no test coverage detected