no-mistakes-postgres-engine 0.109.125

PostgreSQL embedded SQL extraction, schema catalog, and replay-safety analysis for no-mistakes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! Count catalog-key processing for operation-count tests and instrumented benchmarks.
thread_local! {
    static KEY_SPLITS: std::cell::Cell<usize> = const { std::cell::Cell::new(0) };
}

pub(crate) fn count() -> usize {
    KEY_SPLITS.with(std::cell::Cell::get)
}

pub(super) fn record() {
    let next = count() + 1;
    KEY_SPLITS.with(|count| count.set(next));
}