Skip to content

Commit

Permalink
We have to decide on the host to keep hash intact
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-fsn committed Nov 15, 2024
1 parent 2a7deca commit 26f1397
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion images/benchmark-passmark/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ RUN if [ "$(dpkg --print-architecture)" = "arm64" ]; then \

RUN chmod +x /usr/local/bin/pt_linux

ADD passmark.sh /usr/local/bin/passmark.sh
# PassMark expects a terminal
ENV TERM=xterm
CMD ["bash", "-c", "nice -n -20 /usr/local/bin/pt_linux -r 3 1>&2; cat results_all.yml"]
CMD /usr/local/bin/passmark.sh
14 changes: 14 additions & 0 deletions images/benchmark-passmark/passmark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

available_memory=$(LC_ALL=C free -m | awk '/^Mem:/ {print $7}')

# on small-mem machines run the CPU suite only
# -r, -R enum enable autorun, enum values are:
# 1 - CPU Suite only
# 2 - Memory Suite only
# 3 - All Suites
if [ "$available_memory" -lt 512 ]; then
nice -n -20 /usr/local/bin/pt_linux -r 1 1>&2; cat results_cpu.yml
else
nice -n -20 /usr/local/bin/pt_linux -r 3 1>&2; cat results_all.yml
fi

0 comments on commit 26f1397

Please sign in to comment.