MCPcopy Create free account
hub / github.com/argumentcomputer/ix / print_profile_summary

Function print_profile_summary

crates/ffi/src/kernel.rs:1670–1718  ·  view source on GitHub ↗
(
  env_path: &str,
  sink: &ProfileSink,
  profile: &BlockProfile,
)

Source from the content-addressed store, hash-verified

1668 Err(e) => {
1669 return LeanIOResult::error_string(&format!(
1670 "rs_kernel_check_anon: build_anon_work: {e}"
1671 ));
1672 },
1673 };
1674 eprintln!(
1675 "[rs_kernel_check_anon] build work: {:>8.1?} ({} items, {} targets)",
1676 t2.elapsed(),
1677 work.len(),
1678 addrs.len()
1679 );
1680
1681 let failure_log: Option<Arc<FailureLog>> = match fail_out_path.as_deref() {
1682 None => None,
1683 Some(out_path) => match FailureLog::open(out_path, &path, addrs.len()) {
1684 Ok(log) => {
1685 eprintln!("[rs_kernel_check_anon] streaming failures to {out_path}");
1686 Some(Arc::new(log))
1687 },
1688 Err(e) => {
1689 return LeanIOResult::error_string(&format!(
1690 "rs_kernel_check_anon: failed to open fail-out file {out_path}: {e}"
1691 ));
1692 },
1693 },
1694 };
1695
1696 let total = addrs.len();
1697 // Keep our own copy for the per-slot `(hex, result)` FFI return;
1698 // the runner clones internally for worker dispatch.
1699 let addrs_for_return = addrs.clone();
1700 let t3 = Instant::now();
1701 let ixon_env_arc = Arc::new(ixon_env);
1702 let results = match run_anon_checks_parallel(
1703 ixon_env_arc,
1704 work,
1705 addrs,
1706 quiet,
1707 failure_log.clone(),
1708 ) {
1709 Ok(r) => r,
1710 Err(msg) => {
1711 if let Some(log) = failure_log.as_ref() {
1712 log.finalize();
1713 }
1714 return build_uniform_error(total, &format!("[thread] {msg}"));
1715 },
1716 };
1717
1718 let passed = results.iter().filter(|r| r.is_ok()).count();
1719 let failed = results.iter().filter(|r| r.is_err()).count();
1720 eprintln!(
1721 "[rs_kernel_check_anon] {passed}/{total} passed, {failed} failed ({:.1?})",

Callers 1

profile_anon_ixeFunction · 0.85

Calls 3

ram_gib_for_stepsFunction · 0.85
blocksMethod · 0.80
iterMethod · 0.45

Tested by

no test coverage detected