prometheus/model/textparse
Bartlomiej Plotka 733a5e9eb4
textparse: Optimized protobuf parser with custom streaming unmarshal. (#15731)
* textparse: Optimized protobuf parser with custom streaming decoder.

Signed-off-by: bwplotka <bwplotka@gmail.com>

Update model/textparse/protobufparse.go

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

Addressing comments.

Signed-off-by: bwplotka <bwplotka@gmail.com>

decoder: reuse histograms and summaries.

Signed-off-by: bwplotka <bwplotka@gmail.com>

optimize help returning (5% of mem utilization).

Signed-off-by: bwplotka <bwplotka@gmail.com>

Apply suggestions from code review

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

Update prompb/io/prometheus/client/decoder.go

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

Fix build.

Signed-off-by: bwplotka <bwplotka@gmail.com>

* Update model/textparse/protobufparse.go

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

---------

Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2025-02-13 10:38:35 +00:00
..
testdata textparse: Refactor benchmark testdata for all types. (#15998) 2025-02-10 12:26:18 +00:00
benchmark_test.go model/textparse: Change parser interface Metric(...) string to Labels(...) (#16012) 2025-02-12 15:47:56 +00:00
interface.go model/textparse: Change parser interface Metric(...) string to Labels(...) (#16012) 2025-02-12 15:47:56 +00:00
interface_test.go textparse: Optimized protobuf parser with custom streaming unmarshal. (#15731) 2025-02-13 10:38:35 +00:00
nhcbparse.go model/textparse: Change parser interface Metric(...) string to Labels(...) (#16012) 2025-02-12 15:47:56 +00:00
nhcbparse_test.go textparse: Optimized protobuf parser with custom streaming unmarshal. (#15731) 2025-02-13 10:38:35 +00:00
openmetricslex.l bugfix: allow quoted exemplar keys in openmetrics text format 2024-11-12 15:29:44 +00:00
openmetricslex.l.go bugfix: allow quoted exemplar keys in openmetrics text format 2024-11-12 15:29:44 +00:00
openmetricsparse.go model/textparse: Change parser interface Metric(...) string to Labels(...) (#16012) 2025-02-12 15:47:56 +00:00
openmetricsparse_test.go bugfix: allow quoted exemplar keys in openmetrics text format 2024-11-12 15:29:44 +00:00
promlex.l UTF-8: Add support for parsing UTF8 metric and label names 2024-02-15 14:34:37 -05:00
promlex.l.go UTF-8: Add support for parsing UTF8 metric and label names 2024-02-15 14:34:37 -05:00
promparse.go textparse: Optimized protobuf parser with custom streaming unmarshal. (#15731) 2025-02-13 10:38:35 +00:00
promparse_test.go feat: normalize "le" and "quantile" labels values upon ingestion 2024-10-18 17:37:29 +02:00
protobufparse.go textparse: Optimized protobuf parser with custom streaming unmarshal. (#15731) 2025-02-13 10:38:35 +00:00
protobufparse_test.go textparse: Optimized protobuf parser with custom streaming unmarshal. (#15731) 2025-02-13 10:38:35 +00:00
README.md

Making changes to textparse lexers

In the rare case that you need to update the textparse lexers, edit promlex.l or openmetricslex.l and then run the following command: golex -o=promlex.l.go promlex.l

Note that you need golex installed: go get -u modernc.org/golex