-
Notifications
You must be signed in to change notification settings - Fork 59
94 lines (91 loc) · 3.12 KB
/
k6-wallets.yaml
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
name: K6 Wallets Restoration load test
on:
schedule:
- cron: '0 0 * * 6' # 00:00 every Saturday
workflow_dispatch:
inputs:
environment:
description: 'Target environment'
type: choice
required: true
options:
- 'dev'
network:
description: 'Target network'
type: choice
required: true
options:
- 'preprod'
- 'mainnet'
wallet-count:
description: 'Number of wallets to simulate'
type: number
required: true
default: 1000
hd-addr-per-wallet:
description: 'Number of addresses per wallet. Used when running in RestoreHD mode.'
type: number
required: true
default: 10
hd-tx-history-size-per-wallet:
description: 'Maximum number of transactions per wallet. Filter wallet addresses to have a tx history size smaller than this value. Used when running in RestoreHD mode.'
type: number
required: true
default: 100
rampup-duration:
description: 'Ramp up duration in minutes. Up to 100 wallets should use 1m. 500 wallets and above should use 5m or 10m. 1000 wallets should use 10m'
type: choice
required: true
options:
- '10m'
- '5m'
- '1m'
sustain-duration:
description: 'Sustain duration in minutes. Up to 100 wallets should use 2m. 500 wallets and above should use 2m or 5m. 1000 wallets should use 5m'
type: choice
required: true
options:
- '5m'
- '2m'
env:
TARGET_ENV: ${{ inputs.environment || 'dev' }}
TARGET_NET: ${{ inputs.network || 'mainnet'}}
RUN_MODE: 'RestoreHD'
MAX_VU: ${{ inputs.wallet-count || 1000 }}
RAMP_UP_DURATION: ${{ inputs.rampup-duration || '10m' }}
STEADY_STATE_DURATION: ${{ inputs.sustain-duration || '5m' }}
HD_ACTIVE_ADDR_COUNT: ${{ inputs.hd-addr-per-wallet || 10 }}
HD_MAX_TX_HISTORY: ${{ inputs.hd-tx-history-size-per-wallet || 100 }}
jobs:
wallet-restoration:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: 🧰 Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.12.0
- name: 🔨 Build
run: |
yarn install --immutable --inline-builds --mode=skip-build
yarn workspace @cardano-sdk/util-dev build:cjs
env:
NODE_OPTIONS: '--max_old_space_size=8192'
- name: Run k6 cloud test
uses: grafana/k6-action@v0.3.1
env:
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
with:
filename: ./packages/e2e/test/k6/scenarios/wallets.test.js
cloud: true
token: ${{ secrets.K6_CLOUD_API_TOKEN }}
flags: >
-e TARGET_ENV=$TARGET_ENV
-e TARGET_NET=$TARGET_NET
-e RUN_MODE=$RUN_MODE
-e MAX_VU=$MAX_VU
-e RAMP_UP_DURATION=$RAMP_UP_DURATION
-e STEADY_STATE_DURATION=$STEADY_STATE_DURATION
-e HD_ACTIVE_ADDR_COUNT=$HD_ACTIVE_ADDR_COUNT
-e HD_MAX_TX_HISTORY=$HD_MAX_TX_HISTORY