MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / is_free_threaded_request

Function is_free_threaded_request

src/executor/valgrind/helpers/python.rs:71–81  ·  view source on GitHub ↗

Matches a full key variant (`cpython-3.13.0+freethreaded-linux-x86_64-gnu`) or a version with the `t` suffix (`3.13t`, `cpython@3.13.1t`).

(request: &str)

Source from the content-addressed store, hash-verified

69/// Matches a full key variant (`cpython-3.13.0+freethreaded-linux-x86_64-gnu`) or a
70/// version with the `t` suffix (`3.13t`, `cpython@3.13.1t`).
71fn is_free_threaded_request(request: &str) -> bool {
72 if request.contains("+freethreaded") {
73 return true;
74 }
75 request.split(['-', '@']).any(|segment| {
76 let Some(version) = segment.strip_suffix('t') else {
77 return false;
78 };
79 version.ends_with(|c: char| c.is_ascii_digit())
80 })
81}
82
83#[cfg(test)]
84mod tests {

Callers 1

is_free_threaded_pythonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected