-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy path050-user-memory-profile-ctrl.yaml
More file actions
320 lines (284 loc) · 11.1 KB
/
050-user-memory-profile-ctrl.yaml
File metadata and controls
320 lines (284 loc) · 11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# SPDX-License-Identifier: Apache-2.0
name: "050: [USER] Memory Profile Ctrl"
on:
workflow_dispatch:
inputs:
nlg-accounts: #'-R -c 32 -a 100000000 -T 1000 -n 100000 -S hot -p 50 -tt 1m
required: true
default: "1000"
description: "Number of Accounts and NFT tokens"
type: choice
options:
- "100"
- "1000"
nlg-time: #'-R -c 32 -a 100000000 -T 1000 -n 100000 -S hot -p 50 -tt 1m
required: true
default: "3"
description: "Test execution time, in seconds, per each test (of 6 tests)"
type: choice
options:
- "60"
- "120"
- "300"
- "600"
- "1200"
- "3000"
- "3600"
- "7200"
- "19800"
memory-interval:
required: true
default: "200"
type: string
description: 'Interval between memory checks, secs'
add-app-props:
required: false
default: ""
type: string
description: 'Add props to application.properties, e.g. "blockStream.streamMode=RECORDS". Newline is "\n"'
add-settings:
required: false
default: ""
type: string
description: 'Add props to settings.txt, e.g. "state.saveStatePeriod, 300". Newline is "\n"'
nlg-test:
required: true
default: "CryptoTransferLoadTest"
type: string
description: 'Test name'
nlg-args:
required: true
default: "-c 1"
type: string
description: 'test arguments'
nlg-tps:
required: true
default: "100"
type: string
description: 'Transactions Per Second'
versions:
required: true
default: "export CONSENSUS_NODE_VERSION=v0.72.0-rc.4; export BLOCK_NODE_VERSION=v0.27.0; ONE_SHOT_WITH_BLOCK_NODE=false"
type: string
description: 'Versions of containers'
defaults:
run:
shell: bash
permissions:
contents: write
id-token: write
actions: write
statuses: write
env:
GS_ROOT_DIR: gs://performance-engineering-reports/ephemeral/test_runs
GS_ROOT_HTTPS: https://perf.analytics.eng.hashgraph.io/ephemeral/test_runs
jobs:
run-single-node-tests:
name: Single node tests
runs-on: hl-cn-mem-profiler-lin
timeout-minutes: 1440
steps:
- name: Harden Runner
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit
- name: Authenticate to Google Cloud
id: google-auth
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
with:
workload_identity_provider: "projects/716789254648/locations/global/workloadIdentityPools/perf-eng-reports-pool/providers/gh-provider"
service_account: "gh-perf-report-writer@perf-engineering-reports.iam.gserviceaccount.com"
- name: Setup Google Cloud SDK
uses: google-github-actions/setup-gcloud@6189d56e4096ee891640bb02ac264be376592d6a # v2.1.2
- name: Checkout BlockNode scripts
if: false
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: hiero-ledger/hiero-block-node
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: master
path: "./hiero-block-node"
- name: Checkout BlockNode scripts
if: false
run: |
git clone https://${{ secrets.GH_ACCESS_TOKEN }}@github.com/hiero-ledger/hiero-block-node.git hiero-block-node
- name: Setup Helm
shell: bash
run: |
sudo ln -s /home/runner/_work/_tool/helm/4.1.1/x64/linux-amd64/helm /usr/bin/helm
- name: Install Task
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0
with:
version: 3.39.2
- name: Install KubeCtl
uses: step-security/setup-kubectl@2edbf6aff97d814e9dc52827498ac51fe972e6d0 # v4.0.0
with:
version: v1.32.2
# Set up kind; needed for configuring the solo environment
- name: Setup Kind
uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0
with:
install_only: true
node_image: kindest/node:v1.31.4@sha256:2cb39f7295fe7eafee0842b1052a599a4fb0f8bcf3f83d96c7f4864c357c6c30
version: v0.29.0
kubectl_version: v1.32.2
verbosity: 3
wait: 120s
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: 20.18.0
- name: Install Solo
if: false
run: |
npm install -g "@hashgraph/solo@${{ inputs.solo-version || 'latest' }}"
# verify the installation
solo --version
- name: Build Solo
run: |
set +x
set +e
curdir=`pwd`
echo "${curdir}"
ls
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
export NVM_DIR="${HOME}/.nvm"
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh" # This loads nvm
nvm install v24.14.0
nvm use v24.14.0
export PATH="${HOME}"/:"${PATH}"
#solo script
echo '#!/usr/bin/sh -f' > "${HOME}"/solo
echo "node \"${curdir}\"/solo/dist/solo.js \"\$@\"" >> "${HOME}"/solo
chmod a+rx "${HOME}"/solo
sudo mv "${HOME}"/solo /usr/bin/solo
git clone https://github.com/hiero-ledger/solo.git solo
cd solo
git checkout 942ec2d0f1738edead5bbc89ece6cd1516c3bae6
task build:compile
#npm run build
which solo
solo --version
cd ..
- name: Setup Java
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
with:
distribution: temurin
java-version: 25
- name: Install tools
run: |
sudo apt-get update
sudo apt-get install -y docker.io net-tools iputils-ping node-typescript snapd
#YQ
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install -y yq zip unzip
sudo apt install -y x11-common x11-session-utils x11-utils x11-xserver-utils
- name: Install Memory Analyzer
run: |
gcloud --no-user-output-enabled storage cp --recursive gs://performance-engineering-reports/permanent/MemoryAnalyzer-1.16.1.20250109-linux.gtk.x86_64.zip ${HOME}/MemoryAnalyzer-1.16.1.20250109-linux.gtk.x86_64.zip
unzip -q -d ${HOME} ${HOME}/MemoryAnalyzer-1.16.1.20250109-linux.gtk.x86_64.zip
ls ${HOME}/mat
- name: Version update
run: |
/usr/bin/echo -e "${{ inputs.versions }}" > "${{ github.workspace }}"/solo/testenv.sh
- name: Deploy K8S pod
run: |
ls -l
#cd hiero-block-node/tools-and-tests/scripts/solo-e2e-test
#cat .env
#task up
cd "${{ github.workspace }}"/solo
. "${{ github.workspace }}"/solo/testenv.sh
bash ./test/e2e/dual-cluster/setup-dual-e2e.sh
wait_in_minutes=$(expr ${{ inputs.nlg-time }} / 60)
echo SOLO_TEST_CLUSTER=solo-e2e >> .env
echo ONE_SHOT_WITH_BLOCK_NODE=false >> .env
echo MIRROR_NODE_PINGER_TPS=10 >> .env
echo ONE_SHOT_METRICS_TEST_DURATION_IN_MINUTES=${wait_in_minutes} >> .env
cat .env
- name: Start Memory capturing
run: |
cd "${{ github.workspace }}"/solo
cat <<'EOF' > "${{ github.workspace }}"/solo/heapInfoByPod.sh
set +e
set +x
cd "${{ github.workspace }}"/solo
count=0
while [ true ]
do
kubectl get namespaces
for i in `kubectl get namespaces | grep 'one-shot' | awk '{print $1}' | grep -v 'solo-setup'`
do
kubectl -n ${i} exec network-node1-0 -- \
bash -c "ps -aef; jpid=\$(ps -aef | grep -w java | grep -v grep | awk '{print \$2}'); \
if [ \"\$jpid\" != \"\" ]; then echo \"pod $i:\"; \
jcmd \$jpid GC.heap_info; echo \"\"; \
jmap -dump:live,format=b,file=/tmp/test.hprof \$jpid; fi"; \
kubectl -n ${i} cp network-node1-0:/opt/hgcapp/services-hedera/HapiApp2.0/output/recording.jfr "${{ github.workspace }}"/solo/recording.jfr
kubectl -n ${i} cp network-node1-0:/tmp/test.hprof "${{ github.workspace }}"/solo/$i_$count.hprof
ls -l "${{ github.workspace }}"/solo/$i_$count.hprof
done
count=`expr $count + 1`
sleep ${{ inputs.memory-interval }}
done
EOF
nohup bash -c "sleep 300; sleep ${{ inputs.memory-interval }}; sh "${{ github.workspace }}"/solo/heapInfoByPod.sh" > "${{ github.workspace }}"/solo/heapInfoByPod.log 2>&1 &
- name: Run NLG test
run: |
set +e
set +x
#cd hiero-block-node/tools-and-tests/scripts/solo-e2e-test
#task load:up NLG_TEST_TYPE="${{ inputs.nlg-test }}" NLG_ARGS="${{ inputs.nlg-args }} -a ${{ inputs.nlg-accounts }} -tt ${{ inputs.nlg-time }}s" NLG_MAX_TPS="${{ inputs.nlg-tps }}"
. "${{ github.workspace }}"/solo/testenv.sh
cd "${{ github.workspace }}"/solo
task test-e2e-performance
- name: Stop NLG test
if: false
run: |
cd hiero-block-node/tools-and-tests/scripts/solo-e2e-test
task load:down
- name: Report Kubernetes resources
if: false
run: |
kubectl -n solo-network describe nodes
- name: Create report dir
shell: bash
run: |
mkdir "${{ github.workspace }}"/report
- name: Java heap info
if: ${{ !cancelled() }}
run: |
set +e
set +x
cd "${{ github.workspace }}"/solo
cat heapInfoByPod.log
- name: Analyze Java heaps
if: ${{ !cancelled() }}
run: |
set +e
set +x
cd "${{ github.workspace }}"/solo
#process hprof-s
ls -1 *.hprof
for i in `ls -1 *.hprof`
do
mkdir $i.dir
cd $i.dir
mv ../$i ./$i
bash ${HOME}/mat/ParseHeapDump.sh ./$i org.eclipse.mat.api:overview
mkdir -p "${{ github.workspace }}"/report/$i.report
unzip -d "${{ github.workspace }}"/report/$i.report $(find . -name '*System_Overview.zip')
cd "${{ github.workspace }}"/solo
done
- name: Publish logs
if: ${{ !cancelled() }}
run: |
set +e
set +x
ls -l "${{ github.workspace }}"/solo
cp -r $HOME/.solo "${{ github.workspace }}"/report/
cp "${{ github.workspace }}"/solo/*.log "${{ github.workspace }}"/report/
cp "${{ github.workspace }}"/solo/*.jfr "${{ github.workspace }}"/report/
gcloud --no-user-output-enabled storage cp --recursive "${{ github.workspace }}"/report "${{ env.GS_ROOT_DIR }}/MemoryProfile_${{ github.run_number }}"/report
echo Done: solo deploy logs in "${{ env.GS_ROOT_HTTPS }}/MemoryProfile_${{ github.run_number }}"/report