From eeb5942b6b005ce67681fe6a6c694272d6ea7a7e Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Mon, 16 Mar 2020 19:39:53 +0100 Subject: [PATCH] fix: remote profile names and extension (#9145) Remote profiles are not formatted correctly: ``` profile-172.31.91.126_9000-cpu.pprof profile-172.31.91.126_9000-goroutines-before.txt profile-172.31.91.126_9000-goroutines.txt profiling-172.31.80.49_9000-cpu.pprof.pprof profiling-172.31.80.49_9000-goroutines-before.txt.pprof profiling-172.31.80.49_9000-goroutines.txt.pprof profiling-172.31.86.101_9000-cpu.pprof.pprof profiling-172.31.86.101_9000-goroutines-before.txt.pprof profiling-172.31.86.101_9000-goroutines.txt.pprof profiling-172.31.91.191_9000-cpu.pprof.pprof profiling-172.31.91.191_9000-goroutines-before.txt.pprof profiling-172.31.91.191_9000-goroutines.txt.pprof ``` `profiling` -> `profile`, remove extra extension. --- cmd/notification.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/notification.go b/cmd/notification.go index c9ecded9f..8ebe0983f 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -326,7 +326,7 @@ func (sys *NotificationSys) DownloadProfilingData(ctx context.Context, writer io for typ, data := range data { // Send profiling data to zip as file header, zerr := zip.FileInfoHeader(dummyFileInfo{ - name: fmt.Sprintf("profiling-%s-%s.pprof", client.host.String(), typ), + name: fmt.Sprintf("profile-%s-%s", client.host.String(), typ), size: int64(len(data)), mode: 0600, modTime: UTCNow(),