Skip to content

Commit 97bf09a

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

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

.github/workflows/ubuntu.yml

Lines changed: 41 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,32 @@ 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+
df -hT
186+
df .
187+
188+
- name: Set perf logs
189+
run: |
190+
set -x
191+
mkdir -p perf_logs
192+
mpstat -P ALL 30 10 > perf_logs/mpstat.log &
193+
vmstat 30 10 > perf_logs/vmstat.log &
194+
iostat -x 30 10 > perf_logs/iostat.log &
195+
172196
- name: make ${{ matrix.test_task }}
173197
run: |
174198
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
175199
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
176200
177201
$SETARCH make -s ${{ matrix.test_task }} \
178202
${TESTS:+TESTS="$TESTS"} \
179-
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }}
203+
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }} \
204+
${{ endsWith(matrix.os, 'ppc64le') && '|| :' || '' }}
180205
timeout-minutes: ${{ matrix.timeout || 40 }}
181206
env:
182207
RUBY_TESTOPTS: '-q --tty=no'
@@ -185,6 +210,21 @@ jobs:
185210
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
186211
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
187212

213+
- name: Show perf mpstat.log
214+
run: |
215+
pkill mpstat || :
216+
cat perf_logs/mpstat.log
217+
218+
- name: Show perf vmstat.log
219+
run: |
220+
pkill vmstat || :
221+
cat perf_logs/vmstat.log
222+
223+
- name: Show perf iostat.log
224+
run: |
225+
pkill iostat || :
226+
cat perf_logs/iostat.log
227+
188228
- name: make skipped tests
189229
run: |
190230
$SETARCH make -s test-all TESTS="${TESTS//-n!\//-n/}"

0 commit comments

Comments
 (0)