From 308c8c48c15c74a929c430447df3d3c3a3d4001f Mon Sep 17 00:00:00 2001 From: pudongair <744355276@qq.com> Date: Wed, 19 Mar 2025 23:28:34 +0800 Subject: [PATCH] chore: fix some comments (#16237) Signed-off-by: pudongair <744355276@qq.com> --- prompb/io/prometheus/client/decoder.go | 2 +- tsdb/docs/format/chunks.md | 2 +- tsdb/record/record_test.go | 2 +- web/ui/mantine-ui/src/pages/query/urlStateEncoding.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/prompb/io/prometheus/client/decoder.go b/prompb/io/prometheus/client/decoder.go index b21f78cc9c..0d62f1f7cf 100644 --- a/prompb/io/prometheus/client/decoder.go +++ b/prompb/io/prometheus/client/decoder.go @@ -167,7 +167,7 @@ func (m *MetricStreamingDecoder) Label(b *labels.ScratchBuilder) error { return nil } -// parseLabels is essentially LabelPair.Unmarshal but directly adding into scratch builder +// parseLabel is essentially LabelPair.Unmarshal but directly adding into scratch builder // and reusing strings. func parseLabel(dAtA []byte, b *labels.ScratchBuilder) error { var name, value string diff --git a/tsdb/docs/format/chunks.md b/tsdb/docs/format/chunks.md index d6e3a3ae6c..596270ce59 100644 --- a/tsdb/docs/format/chunks.md +++ b/tsdb/docs/format/chunks.md @@ -38,7 +38,7 @@ Notes: * `len`: Chunk size in bytes. 1 to 10 bytes long using the [`` encoding](https://go.dev/src/encoding/binary/varint.go). * `encoding`: Currently either `XOR`, `histogram`, or `floathistogram`, see [code for numerical values](https://github.com/prometheus/prometheus/blob/02d0de9987ad99dee5de21853715954fadb3239f/tsdb/chunkenc/chunk.go#L28-L47). * `data`: See below for each encoding. -* `checksum`: Checksum of `encoding` and `data`. It's a [cyclic redudancy check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) with the Castagnoli polynomial, serialised as an unsigned 32 bits big endian number. Can be refered as a `CRC-32C`. +* `checksum`: Checksum of `encoding` and `data`. It's a [cyclic redundancy check](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) with the Castagnoli polynomial, serialised as an unsigned 32 bits big endian number. Can be referred as a `CRC-32C`. ## XOR chunk data diff --git a/tsdb/record/record_test.go b/tsdb/record/record_test.go index 9b2eb89c5a..3785663643 100644 --- a/tsdb/record/record_test.go +++ b/tsdb/record/record_test.go @@ -477,7 +477,7 @@ type recordsMaker struct { } // BenchmarkWAL_HistogramEncoding measures efficiency of encoding classic -// histograms and native historgrams with custom buckets (NHCB). +// histograms and native histograms with custom buckets (NHCB). func BenchmarkWAL_HistogramEncoding(b *testing.B) { initClassicRefs := func(labelCount, histograms, buckets int) (series []RefSeries, floatSamples []RefSample, histSamples []RefHistogramSample) { ref := chunks.HeadSeriesRef(0) diff --git a/web/ui/mantine-ui/src/pages/query/urlStateEncoding.ts b/web/ui/mantine-ui/src/pages/query/urlStateEncoding.ts index f948205a12..ca9988e60d 100644 --- a/web/ui/mantine-ui/src/pages/query/urlStateEncoding.ts +++ b/web/ui/mantine-ui/src/pages/query/urlStateEncoding.ts @@ -73,7 +73,7 @@ export const decodePanelOptionsFromURLParams = (query: string): Panel[] => { decodeSetting("end_input", (value) => { panel.visualizer.endTime = parseTime(value); }); - // Legacy "step_input" parameter, overriden below by + // Legacy "step_input" parameter, overridden below by // "res_type" / "res_density" / "res_step" if present. decodeSetting("step_input", (value) => { if (parseInt(value) > 0) {