Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: logdog/appengine/cmd/coordinator/services/main.go

Issue 2588643002: Enable AppEngine profiling endpoints. (Closed)
Patch Set: Actually use the right notation. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The LUCI Authors. All rights reserved. 1 // Copyright 2015 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0 2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file. 3 // that can be found in the LICENSE file.
4 4
5 package module 5 package module
6 6
7 import ( 7 import (
8 "net/http" 8 "net/http"
9 9
10 // Importing pprof implicitly installs "/debug/*" profiling handlers.
11 _ "net/http/pprof"
12
10 "github.com/luci/luci-go/appengine/gaemiddleware" 13 "github.com/luci/luci-go/appengine/gaemiddleware"
11 "github.com/luci/luci-go/grpc/prpc" 14 "github.com/luci/luci-go/grpc/prpc"
12 registrationPb "github.com/luci/luci-go/logdog/api/endpoints/coordinator /registration/v1" 15 registrationPb "github.com/luci/luci-go/logdog/api/endpoints/coordinator /registration/v1"
13 servicesPb "github.com/luci/luci-go/logdog/api/endpoints/coordinator/ser vices/v1" 16 servicesPb "github.com/luci/luci-go/logdog/api/endpoints/coordinator/ser vices/v1"
14 "github.com/luci/luci-go/logdog/appengine/coordinator" 17 "github.com/luci/luci-go/logdog/appengine/coordinator"
15 "github.com/luci/luci-go/logdog/appengine/coordinator/endpoints/registra tion" 18 "github.com/luci/luci-go/logdog/appengine/coordinator/endpoints/registra tion"
16 "github.com/luci/luci-go/logdog/appengine/coordinator/endpoints/services " 19 "github.com/luci/luci-go/logdog/appengine/coordinator/endpoints/services "
17 "github.com/luci/luci-go/server/router" 20 "github.com/luci/luci-go/server/router"
18 21
19 // Include mutations package so its Mutations will register with tumble via 22 // Include mutations package so its Mutations will register with tumble via
20 // init(). 23 // init().
21 _ "github.com/luci/luci-go/logdog/appengine/coordinator/mutations" 24 _ "github.com/luci/luci-go/logdog/appengine/coordinator/mutations"
22 ) 25 )
23 26
24 // Run installs and executes this site. 27 // Run installs and executes this site.
25 func init() { 28 func init() {
26 r := router.New() 29 r := router.New()
27 30
28 // Setup Cloud Endpoints. 31 // Setup Cloud Endpoints.
29 svr := prpc.Server{} 32 svr := prpc.Server{}
30 servicesPb.RegisterServicesServer(&svr, services.New()) 33 servicesPb.RegisterServicesServer(&svr, services.New())
31 registrationPb.RegisterRegistrationServer(&svr, registration.New()) 34 registrationPb.RegisterRegistrationServer(&svr, registration.New())
32 35
33 // Standard HTTP endpoints. 36 // Standard HTTP endpoints.
34 base := gaemiddleware.BaseProd().Extend(coordinator.ProdCoordinatorServi ce) 37 base := gaemiddleware.BaseProd().Extend(coordinator.ProdCoordinatorServi ce)
35 svr.InstallHandlers(r, base) 38 svr.InstallHandlers(r, base)
36 39
37 http.Handle("/", r) 40 http.Handle("/", r)
38 } 41 }
OLDNEW
« no previous file with comments | « logdog/appengine/cmd/coordinator/backend/module.cfg ('k') | logdog/appengine/cmd/coordinator/services/module.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698