Go implementation of DAS (Data Aggregation System for CMS)
To compile the server you need a Go compiler, then perform the following:
# one time operation, setup your GOPATH and download the following
go get github.com/dmwm/cmsauth
go get github.com/vkuznet/x509proxy
go get gopkg.in/mgo.v2
# to build DAS server run
make
It will build das2go
executable which you can fetch from UNIX shell.
By default it serves requests on localhost:8000,
feel free to modify code accoringly.
DAS server supports three ways to profile itself
go tool pprof http://localhost:8217/debug/pprof/heap
go tool pprof http://localhost:8217/debug/pprof/block
go tool pprof http://localhost:8217/debug/pprof/profile
go tool pprof http://localhost:8217/debug/pprof/mutex
expvarmon -ports="8217"
go-torch -u http://localhost:8217 --seconds 10
will generate svg flame
graphIt is possible to change verbosity level and log type of running DAS server. To change verbosity level please issue the following command:
# increase verbose level to 1
scurl -X POST -d '{"level":1}' http://localhost:8217/das/server
# set verbose level to 0
scurl -X POST -d '{"level":0}' http://localhost:8217/das/server
To change log type please use this command:
# to change log formatter to json
scurl -X POST -d '{"logFormatter":"json"}' http://localhost:8217/das/server
# to change log formatter to text
scurl -X POST -d '{"logFormatter":"text"}' http://localhost:8217/das/server