Files
synapse/rust
Erik JohnstonandClaude Fable 5 49c163679d Port ContextResourceUsage to a Rust pyclass
The first slice of moving the logcontext machinery into the Rust
extension: ContextResourceUsage becomes a native class in the new
synapse.synapse_rust.logcontext module (rust/src/logging/context.rs),
re-exported from synapse.logging.context so callers are unchanged.

The public attribute surface, operators and repr are a compatibility
contract with the Python callers (Measure, request/background-process
metrics, the task scheduler, ...). Keeping the tracker native lets the
upcoming switch machinery do its rusage accounting without allocating a
Python object per operation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JFbRtswu7rsHrttJFauUUb
2026-07-17 11:15:11 +00:00
..