MCPcopy Index your code
hub / github.com/Recordscript/recordscript / test_decoder

Function test_decoder

libs/scrap/examples/benchmark.rs:323–339  ·  view source on GitHub ↗
(format: CodecFormat, h26xs: &Vec<Vec<u8>>)

Source from the content-addressed store, hash-verified

321 }
322
323 fn test_decoder(format: CodecFormat, h26xs: &Vec<Vec<u8>>) {
324 let mut decoder = HwRamDecoder::new(format).unwrap();
325 let start = Instant::now();
326 let mut cnt = 0;
327 for h26x in h26xs {
328 let _ = decoder.decode(h26x).unwrap();
329 cnt += 1;
330 }
331 let device = format!("{:?}", decoder.info.hwdevice).to_lowercase();
332 let device = device.split("_").last().unwrap();
333 println!(
334 "{} {}: {:?}",
335 decoder.info.name,
336 device,
337 start.elapsed() / cnt
338 );
339 }
340}

Callers 1

testFunction · 0.85

Calls 1

decodeMethod · 0.45

Tested by

no test coverage detected