From 9fd003d54a960ea5910ac28595e708b918ed9e3e Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Mon, 13 Feb 2023 10:51:55 -0800 Subject: [PATCH] all: rename ParseStream -> stream.Parse This is a follow-up for 057698f7fbfd1d1322a888f7b26bebead83fe115 --- lib/promscrape/client.go | 2 +- lib/protoparser/prometheus/stream/streamparser_test.go | 2 +- lib/protoparser/promremotewrite/stream/streamparser.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/promscrape/client.go b/lib/promscrape/client.go index 185c693ad0..52fa157b5c 100644 --- a/lib/promscrape/client.go +++ b/lib/promscrape/client.go @@ -39,7 +39,7 @@ type client struct { // hc is the default client optimized for common case of scraping targets with moderate number of metrics. hc *fasthttp.HostClient - // sc (aka `stream client`) is used instead of hc if ScrapeWork.ParseStream is set. + // sc (aka `stream client`) is used instead of hc if ScrapeWork.StreamParse is set. // It may be useful for scraping targets with millions of metrics per target. sc *http.Client diff --git a/lib/protoparser/prometheus/stream/streamparser_test.go b/lib/protoparser/prometheus/stream/streamparser_test.go index d9eed3d522..fb37b49a2f 100644 --- a/lib/protoparser/prometheus/stream/streamparser_test.go +++ b/lib/protoparser/prometheus/stream/streamparser_test.go @@ -13,7 +13,7 @@ import ( "github.com/VictoriaMetrics/VictoriaMetrics/lib/protoparser/prometheus" ) -func TestParseStream(t *testing.T) { +func TestParse(t *testing.T) { common.StartUnmarshalWorkers() defer common.StopUnmarshalWorkers() diff --git a/lib/protoparser/promremotewrite/stream/streamparser.go b/lib/protoparser/promremotewrite/stream/streamparser.go index 23d7693c74..cabbd4b205 100644 --- a/lib/protoparser/promremotewrite/stream/streamparser.go +++ b/lib/protoparser/promremotewrite/stream/streamparser.go @@ -32,7 +32,7 @@ func Parse(r io.Reader, callback func(tss []prompb.TimeSeries) error) error { return err } - // Synchronously process the request in order to properly return errors to ParseStream caller, + // Synchronously process the request in order to properly return errors to Parse caller, // so it could properly return HTTP 503 status code in response. // See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/896 bb := bodyBufferPool.Get()