Skip to content
This repository was archived by the owner on Mar 12, 2026. It is now read-only.

Commit 9cec563

Browse files
authored
feat: add hand-written Prometheus remote write request parser (#1628)
## Rationale A hand-written remote write request parser to replace prost, with the primary goal of achieving zero-allocation parsing. ## Detailed Changes - The new `remote_write` directory contains the core implementation of the hand-written parser. - Add benchmarks. - Add a .proto file in `pb_types`. - Fix CI errors. ## Test Plan - Unit tests can be found at the end of the `pb_reader.rs`. - A comprehensive equivalence test is available in `equivalence_test.rs`, which validates the correctness of the hand-written parser by comparing its output with that of the prost auto-generated parser.
1 parent 25fdaac commit 9cec563

33 files changed

+3261
-56
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
run: |
6262
sudo apt update
6363
sudo apt install --yes protobuf-compiler
64+
cargo install pb-rs
6465
- name: Install check binaries
6566
run: |
6667
cargo install --git https://github.com/DevinR528/cargo-sort --rev 55ec890 --locked
@@ -82,6 +83,7 @@ jobs:
8283
run: |
8384
sudo apt update
8485
sudo apt install --yes protobuf-compiler
86+
cargo install pb-rs
8587
- uses: Swatinem/rust-cache@v2
8688
- name: Run Unit Tests
8789
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ integration_tests/dist_query/output
99
.project
1010
.tools
1111
bin
12+
!src/benchmarks/src/bin
1213
coverage.txt
1314
tini

0 commit comments

Comments
 (0)