Skip to content

Commit 5181a1f

Browse files
committed
[DEBUG] Check performance
Make `make check` return exit status zero forcibly to print logs.
1 parent 71f6d92 commit 5181a1f

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

.github/workflows/ubuntu.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,13 @@ jobs:
8686
bundler: none
8787
if: ${{ !endsWith(matrix.os, 'arm') && !endsWith(matrix.os, 'ppc64le') && !endsWith(matrix.os, 's390x') }}
8888

89+
- name: Check perf commands
90+
run: |
91+
command -v mpstat
92+
command -v vmstat
93+
command -v iostat
94+
working-directory:
95+
8996
# Avoid possible test failures with the zlib applying the following patch
9097
# on s390x CPU architecture.
9198
# https://github.com/madler/zlib/pull/410
@@ -169,14 +176,29 @@ jobs:
169176
diff -u ../src/spec/ruby/library/etc/struct_passwd_spec.rb{.orig,} || :
170177
if: ${{ endsWith(matrix.os, 'ppc64le') || endsWith(matrix.os, 's390x') }}
171178

179+
- name: Show perf values
180+
run: |
181+
set -x
182+
nproc
183+
uptime
184+
free -h
185+
186+
- name: Set perf logs
187+
run: |
188+
set -x
189+
mkdir -p perf_logs
190+
mpstat -P ALL 30 10 > perf_logs/mpstat.log &
191+
vmstat 30 10 > perf_logs/vmstat.log &
192+
iostat -x 30 10 > perf_logs/iostat.log &
172193
- name: make ${{ matrix.test_task }}
173194
run: |
174195
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
175196
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
176197
177198
$SETARCH make -s ${{ matrix.test_task }} \
178199
${TESTS:+TESTS="$TESTS"} \
179-
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }}
200+
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }} \
201+
${{ endsWith(matrix.os, 'ppc64le') && '|| :' }}
180202
timeout-minutes: ${{ matrix.timeout || 40 }}
181203
env:
182204
RUBY_TESTOPTS: '-q --tty=no'
@@ -185,6 +207,21 @@ jobs:
185207
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
186208
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
187209

210+
- name: Show perf mpstat.log
211+
run: |
212+
pkill mpstat | :
213+
cat perf_logs/mpstat.log
214+
215+
- name: Show perf vmstat.log
216+
run: |
217+
pkill vmstat | :
218+
cat perf_logs/vmstat.log
219+
220+
- name: Show perf iostat.log
221+
run: |
222+
pkill iostat | :
223+
cat perf_logs/iostat.log
224+
188225
- name: make skipped tests
189226
run: |
190227
$SETARCH make -s test-all TESTS="${TESTS//-n!\//-n/}"

0 commit comments

Comments
 (0)