Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodesdev committed Sep 21, 2024
1 parent 37c1695 commit 2de29ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions crates/rustfinity-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL rustfinity-runner="true"
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
heaptrack \
&& rm -rf /var/lib/apt/lists/*

# Build the Runner CLI
Expand Down
1 change: 1 addition & 0 deletions crates/rustfinity-runner/Dockerfile.staging
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ LABEL rustfinity-runner="true"
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
heaptrack \
&& rm -rf /var/lib/apt/lists/*

# Build the Runner CLI
Expand Down
7 changes: 3 additions & 4 deletions crates/rustfinity-runner/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,15 @@ async fn memory_benchmark(challenge: &str, test_binary_path: &str) -> anyhow::Re
let last_index = details.len() - 1;
let details = details[last_index];

let mut memory = "";
let mut memory = String::new();

//let memory: Vec<_> = details.split("peak heap memory consumption:").collect();
details.lines().for_each(|line| {
if line.contains("peak heap memory consumption:") {
memory = line;
memory = line.replace("peak", "Peak");
}
});

Ok(memory.to_string())
Ok(memory)
}

async fn run_tests(code_base64: &str, challenge: &str) -> anyhow::Result<String> {
Expand Down

0 comments on commit 2de29ba

Please sign in to comment.