1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-11 17:18:28 +02:00

use service id in profile file name (#925)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Vasiliy Tolstov 2019-11-08 12:11:55 +03:00 committed by Asim Aslam
parent 6f28852e1b
commit 8227206208

View File

@ -154,8 +154,9 @@ func (s *service) Run() error {
if prof := os.Getenv("MICRO_DEBUG_PROFILE"); len(prof) > 0 {
service := s.opts.Server.Options().Name
version := s.opts.Server.Options().Version
id := s.opts.Server.Options().Id
profiler := pprof.NewProfile(
profile.Name(service + "." + version),
profile.Name(service + "." + version + "." + id),
)
if err := profiler.Start(); err != nil {
return err