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

Function test_allocation_tracking

crates/memtrack/tests/c_tests.rs:85–98  ·  view source on GitHub ↗
(
    #[case] test_case: &AllocationTestCase,
)

Source from the content-addressed store, hash-verified

83#[case(&ALLOCATION_TEST_CASES[7])]
84#[test_log::test]
85fn test_allocation_tracking(
86 #[case] test_case: &AllocationTestCase,
87) -> Result<(), Box<dyn std::error::Error>> {
88 let temp_dir = TempDir::new()?;
89 let binary = compile_c_source(test_case.source, test_case.name, temp_dir.path())?;
90
91 let (events, thread_handle) = shared::track_binary(&binary)?;
92
93 assert_events_snapshot!(test_case.name, events);
94
95 thread_handle.join().unwrap();
96
97 Ok(())
98}

Callers

nothing calls this directly

Calls 3

compile_c_sourceFunction · 0.85
track_binaryFunction · 0.85
pathMethod · 0.80

Tested by

no test coverage detected