Skip to content

Commit

Permalink
CI OOM fixed, let's see if we can be a bit more aggressive
Browse files Browse the repository at this point in the history
  • Loading branch information
danleh committed Jul 26, 2024
1 parent 6c31835 commit 4f0184f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/test_utilities/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub fn for_each_valid_wasm_binary_in_test_set(test_fn: impl Fn(&Path) + Send + S
.map(|file| file.len())
.unwrap_or(0);

const AST_BYTES_PER_INSTRUCTION_BYTE_APPROX: u64 = 100;
const AST_BYTES_PER_INSTRUCTION_BYTE_APPROX: u64 = 20;
let memory_needed_for_ast_approx = module_size_bytes * AST_BYTES_PER_INSTRUCTION_BYTE_APPROX;

let memory_available = {
Expand All @@ -52,7 +52,7 @@ pub fn for_each_valid_wasm_binary_in_test_set(test_fn: impl Fn(&Path) + Send + S
system.available_memory()
};
if memory_needed_for_ast_approx > memory_available {
eprintln!("Skipping {} due to running low on memory...\n\t{} bytes memory available\n\t{} bytes module size\n\t{} bytes approx. required", path.display(), memory_available, module_size_bytes, memory_needed_for_ast_approx);
eprintln!("Skipping {} due to running low on memory...\n\t{:10} bytes memory available\n\t{:10} bytes module size\n\t{:10} bytes approx. required", path.display(), memory_available, module_size_bytes, memory_needed_for_ast_approx);
return;
}

Expand Down

0 comments on commit 4f0184f

Please sign in to comment.