Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5c1e2b6
arrow: add Prometheus series staleness detection and StalenessTracker
bwplotka Nov 8, 2026
33d3f84
arrow: document why SparseFlagsCol omits all-zero flags columns
bwplotka Nov 12, 2026
fd05a0e
arrow: clarify signaling StaleNaN bit semantics and implement Debug f…
bwplotka Nov 12, 2026
9059c2b
arrow: lazily intern only series attributes in StalenessTracker
bwplotka Nov 12, 2026
cb2212b
arrow: key StalenessTracker families by canonical name and MetricType
bwplotka Nov 12, 2026
125e1cb
arrow: defer StalenessTracker active and family metadata commit until…
bwplotka Nov 12, 2026
e7d8e01
arrow: bound StalenessTracker live heap via dead-series compaction an…
bwplotka Nov 12, 2026
77ca1d0
arrow: omit stale data point values instead of writing STALE_NAN into…
bwplotka Nov 12, 2026
924567a
arrow: skip staleness tracking for explicit wire timestamps by default
bwplotka Nov 12, 2026
ae16871
arrow: honor DecodeBudget during stale draining and add step_decode_w…
bwplotka Nov 12, 2026
0035794
arrow: remove duplicate encode_stale_target alias and document stalen…
bwplotka Nov 12, 2026
4eb183d
tests: preserve stateless OpenMetrics dhat check alongside optional S…
bwplotka Nov 12, 2026
a8a1c02
arrow: add unit and OTAP tests for staleness edge cases, compaction, …
bwplotka Nov 12, 2026
950df69
arrow: specialize untracked decode loop and fast-path live scalar values
bwplotka Nov 12, 2026
8daab05
arrow: sync tracked family batch ID when skipping explicit-timestamp …
bwplotka Nov 13, 2026
db1dbb5
arrow: bind StalenessTracker to active cursor scrape_id across steps
bwplotka Nov 13, 2026
28a4fd4
arrow: avoid double _total strip on stale counters and guard saw_tota…
bwplotka Nov 13, 2026
b26f17c
arrow: release excess StalenessTracker capacity on zero active series…
bwplotka Nov 13, 2026
a2f4ef7
arrow: expand unit tests for StalenessTracker compaction, metadata, a…
bwplotka Nov 13, 2026
2673ea0
arrow: deduplicate target label sets and pack StalenessTracker arenas
bwplotka Nov 13, 2026
54f574e
arrow: add flush_target_stale_stream and roll back empty tracker scrapes
bwplotka Nov 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion crates/expfmt/benches/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ use std::pin::{Pin, pin};
use std::task::{Context, Poll, Waker};

use benchfmt::{CountingAlloc, Suite};
use prometheus_expfmt::arrow::{ArrowDecoder, DecodeBudget, DecodeOptions, DecodeStep};
use prometheus_expfmt::arrow::{
ArrowDecoder, DecodeBudget, DecodeOptions, DecodeStep, StalenessTracker,
};
use prometheus_expfmt::format::Format;

#[global_allocator]
Expand Down Expand Up @@ -216,6 +218,32 @@ fn main() {
}
}
},
)
.bench(
format!("Decode/case={case}/mode=decode_staleness"),
move |b| {
let mut decoder = ArrowDecoder::new();
let mut tracker = StalenessTracker::new();
black_box(
decoder
.decode_with_staleness(payload, &Format::TEXT, &opts, &mut tracker)
.unwrap(),
);

b.set_bytes(bytes);
b.report_allocs();
while b.keep_running() {
let records = decoder
.decode_with_staleness(
black_box(payload),
&Format::TEXT,
&opts,
&mut tracker,
)
.unwrap();
black_box(records);
}
},
);
}

Expand Down
Loading
Loading