1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//! Minimal process-wide counter for Statistics.db Table-of-Contents (TOC) walks
//! (issue #1658, epic #1606).
//!
//! The metadata stack re-walks the Statistics.db TOC several times during a
//! single SSTable open — once to locate the `HEADER` (SerializationHeader)
//! offset (`enhanced_statistics_parser::header::parse_statistics_toc_for_header_offset`)
//! and again inside `repair_metadata::stats_component_bounds`, which
//! `read_table_counts` and `parse_stats_extras` each invoke while building
//! `SSTableStatistics`. This counter lets the A5 cold-open bench
//! (`benches/open.rs`) MEASURE that redundancy so a fix can be scoped against a
//! real number rather than a guess. It is NOT a decoding heuristic: nothing in
//! the parse path reads the count, so it has no effect on correctness (#28).
//!
//! The instrumentation is gated behind `cli-helpers` (roborev #1658): the
//! counter is only read by the cli-helpers-gated bench, so production builds
//! (default features) carry zero overhead — `record_toc_walk()` compiles to an
//! empty inline no-op.
/// Record that a Statistics.db TOC was walked once. Called at each TOC-walk site.
/// Gated behind cli-helpers so production builds carry zero overhead (roborev #1658).
pub
/// No-op in production builds (when cli-helpers is disabled).
pub
// The counter and its accessors are only compiled when cli-helpers is enabled
// (the bench that reads them is also gated on cli-helpers).
pub use ;
// When cli-helpers is disabled, provide stub functions so the bench module
// (which is itself gated on cli-helpers) still compiles if accidentally reached.