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

Function rs_shard_esp

crates/ffi/src/kernel.rs:1928–1955  ·  view source on GitHub ↗
(
  esp_path: LeanString<LeanBorrowed<'_>>,
  num_shards: LeanString<LeanBorrowed<'_>>,
  balance_pct: LeanString<LeanBorrowed<'_>>,
  parallelism: LeanString<LeanBorrowed<'_>>,
  out_path: LeanString

Source from the content-addressed store, hash-verified

1926 tracing_texray::rss_sampler::reset_peak_tree_rss();
1927 let t = Instant::now();
1928 let selected = if skip_deps {
1929 vec![ctx.kernel_work[*item_idx].clone()]
1930 } else {
1931 closure_work_items(&ctx, &[*item_idx])
1932 };
1933 let (work, addrs) = index_anon_work(selected);
1934 let total = addrs.len();
1935 let results = match run_anon_checks_parallel(
1936 Arc::clone(&ctx.env),
1937 work,
1938 addrs.clone(),
1939 quiet,
1940 None,
1941 ) {
1942 Ok(r) => r,
1943 Err(msg) => {
1944 return build_uniform_error(total, &format!("[thread] {msg}"));
1945 },
1946 };
1947 let failed = results.iter().filter(|r| r.is_err()).count();
1948 let secs = t.elapsed().as_secs_f64();
1949 let tput = if secs > 0.0 {
1950 f64::from(u32::try_from(total).unwrap_or(u32::MAX)) / secs
1951 } else {
1952 0.0
1953 };
1954 let status = if failed > 0 {
1955 ix_bench::Status::Rejected
1956 } else {
1957 ix_bench::Status::Ok
1958 };

Callers

nothing calls this directly

Calls 3

shard_espFunction · 0.85
maxMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected