diff --git a/cmd/tools/rest/rest.go b/cmd/tools/rest/rest.go index ec6174dd8..f5f7743fa 100644 --- a/cmd/tools/rest/rest.go +++ b/cmd/tools/rest/rest.go @@ -491,6 +491,11 @@ func FetchRestPerfDataStream(client *Client, href string, processBatch func([]Pe if err := processBatch([]PerfRecord{p}); err != nil { return err } + } else { + // Call processBatch with an empty list to handle no records scenario + if err := processBatch([]PerfRecord{}); err != nil { + return err + } } prevLink = nextLink