From 4e6d717f39de6cfda0cf074a1cf8a3dda36aec23 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Wed, 20 Jan 2021 15:49:53 -0800 Subject: [PATCH] Compress profiling data (#11313) Trace data can be rather large and compresses fine. Compress profile data in zip files: ``` 277.895.314 before.profiles.zip 152.800.318 after.profiles.zip ``` --- cmd/notification.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/notification.go b/cmd/notification.go index baf553be7..006644b1c 100644 --- a/cmd/notification.go +++ b/cmd/notification.go @@ -335,6 +335,7 @@ func (sys *NotificationSys) DownloadProfilingData(ctx context.Context, writer io logger.LogIf(ctx, zerr) continue } + header.Method = zip.Deflate zwriter, zerr := zipWriter.CreateHeader(header) if zerr != nil { reqInfo := (&logger.ReqInfo{}).AppendTags("peerAddress", client.host.String()) @@ -381,6 +382,7 @@ func (sys *NotificationSys) DownloadProfilingData(ctx context.Context, writer io if zerr != nil { return profilingDataFound } + header.Method = zip.Deflate zwriter, zerr := zipWriter.CreateHeader(header) if zerr != nil {