Daily Archives: 04.04.2019

How to make grpc call from shell

1 https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md grpc_cli call localhost:7020 ChatAPI.GetChats «external_user:{id:’30594028′,type:1}, limit:10, offset:0, order:ORDER_DESC, requested_by_external_user:{id:’30594028′,type:1},with_unread_count:true» 2 https://github.com/fullstorydev/grpcurl grpcurl -plaintext -emit-defaults -d ‘{«lozon_id»: 15515160432000}’ -H ‘User-Name: grpcurl’ localhost:7020 points/FindPointByLozonID

How to analyze the performance of your go application in production

You should definitely use chi’s middleware for running pprof and stuff in your admin panel. That’s the repo — https://github.com/go-chi/chi That’s the profiler — https://github.com/go-chi/chi/blob/master/middleware/profiler.go CPU profiling After that you can run something like this in shell: go tool pprof -png ~/Downloads/profile Or just open it in the browser: go tool pprof -http=:1234 ~/Downloads/profile If …

Read more