ifc_lite_geometry/rect_fast/
param_stats.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
5static PARAM_FIRES: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
6
7/// Count one parametric fast-path fire (the analytic cut was emitted).
8pub fn param_record_fire() {
9    crate::telemetry_transaction::record(|| {
10        PARAM_FIRES.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
11    });
12}
13/// Read + reset the parametric fast-path fire counter.
14pub fn take_param_fires() -> u64 {
15    PARAM_FIRES.swap(0, std::sync::atomic::Ordering::Relaxed)
16}