Skip to content

Commit 603e5ae

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

File tree

1 file changed

+53
-1
lines changed

1 file changed

+53
-1
lines changed

.github/workflows/ubuntu.yml

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

89+
- name: Check cgroups sys files
90+
run: |
91+
set -x
92+
cat /sys/fs/cgroup/cpuset.cpus.effective || :
93+
sleep 0.1
94+
cat /sys/fs/cgroup/cpuset.cpus || :
95+
sleep 0.1
96+
cat /sys/fs/cgroup/cpu.max || :
97+
sleep 0.1
98+
cat /sys/fs/cgroup/cpu.stat || :
99+
working-directory:
100+
101+
- name: Check perf commands
102+
run: |
103+
command -v mpstat
104+
command -v vmstat
105+
command -v iostat
106+
working-directory:
107+
89108
# Avoid possible test failures with the zlib applying the following patch
90109
# on s390x CPU architecture.
91110
# https://github.com/madler/zlib/pull/410
@@ -169,14 +188,32 @@ jobs:
169188
diff -u ../src/spec/ruby/library/etc/struct_passwd_spec.rb{.orig,} || :
170189
if: ${{ endsWith(matrix.os, 'ppc64le') || endsWith(matrix.os, 's390x') }}
171190

191+
- name: Show perf values
192+
run: |
193+
set -x
194+
nproc
195+
uptime
196+
free -h
197+
df -hT
198+
df .
199+
200+
- name: Set perf logs
201+
run: |
202+
set -x
203+
mkdir -p perf_logs
204+
mpstat -P ALL 30 10 > perf_logs/mpstat.log &
205+
vmstat 30 10 > perf_logs/vmstat.log &
206+
iostat -x 30 10 > perf_logs/iostat.log &
207+
172208
- name: make ${{ matrix.test_task }}
173209
run: |
174210
test -n "${LAUNCHABLE_STDOUT}" && exec 1> >(tee "${LAUNCHABLE_STDOUT}")
175211
test -n "${LAUNCHABLE_STDERR}" && exec 2> >(tee "${LAUNCHABLE_STDERR}")
176212
177213
$SETARCH make -s ${{ matrix.test_task }} \
178214
${TESTS:+TESTS="$TESTS"} \
179-
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }}
215+
${{ !contains(matrix.test_task, 'bundle') && 'RUBYOPT=-w' || '' }} \
216+
${{ endsWith(matrix.os, 'ppc64le') && '|| :' || '' }}
180217
timeout-minutes: ${{ matrix.timeout || 40 }}
181218
env:
182219
RUBY_TESTOPTS: '-q --tty=no'
@@ -185,6 +222,21 @@ jobs:
185222
LAUNCHABLE_STDOUT: ${{ steps.launchable.outputs.stdout_report_path }}
186223
LAUNCHABLE_STDERR: ${{ steps.launchable.outputs.stderr_report_path }}
187224

225+
- name: Show perf mpstat.log
226+
run: |
227+
pkill mpstat || :
228+
cat perf_logs/mpstat.log
229+
230+
- name: Show perf vmstat.log
231+
run: |
232+
pkill vmstat || :
233+
cat perf_logs/vmstat.log
234+
235+
- name: Show perf iostat.log
236+
run: |
237+
pkill iostat || :
238+
cat perf_logs/iostat.log
239+
188240
- name: make skipped tests
189241
run: |
190242
$SETARCH make -s test-all TESTS="${TESTS//-n!\//-n/}"

0 commit comments

Comments
 (0)