forked from 0xPolygonZero/zk_evm
-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (88 loc) · 3.33 KB
/
benchmark.yml
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: Run benchmark test
on:
workflow_dispatch:
inputs:
machine_type:
description: 'The GCE machine type. (See docs for complete list of machine types https://cloud.google.com/compute/docs/general-purpose-machines)'
default: 't2d-standard-60'
type: string
num_workers:
description: 'Number of zero-bin workers'
default: '100'
required: true
type: string
cpu_request:
description: 'The CPU request set for the workers'
default: '11'
required: true
type: string
cpu_limit:
description: 'The CPU limit set for the workers'
default: '11'
required: true
type: string
memory:
description: 'The memory set for the workers'
default: '60Gi'
required: false
type: string
block_range:
description: 'A comma separated values for the block range start and end to prove, in the following format "block_start,block_end". (Set to the same values to only prove 1 block)'
required: true
default: '100,101'
type: string
prover_configs:
description: 'A comma separated values for additional configs for the proving, in the following format "batch_size,cpu_cycles".'
default: '10,19'
type: string
other_args:
description: 'Other text to append into the generated CSV file'
required: true
type: string
rpc_endpoint:
description: 'The RPC endpoint zero-bin will use'
required: false
default: 'IMX_RPC'
type: choice
options:
- IMX_RPC
- INTERNAL_RPC
jobs:
test:
name: Run benchmarks tests
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_ID }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }}
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
- name: Get GKE credentials
id: 'get-credentials'
uses: 'google-github-actions/get-gke-credentials@v2'
with:
cluster_name: 'immutable-prod'
location: 'us-central1'
- name: Run benchmark script
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_WORKLOAD_IDENTITY_ID: ${{ secrets.GCP_WORKLOAD_IDENTITY_ID }}
GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }}
ENVIRONMENT: production
run: |-
IFS=',' read -r block_start block_end <<< ${{ inputs.block_range }}
IFS=',' read -r batch_size cpu_cycles <<< ${{ inputs.prover_configs }}
echo "block_start: $block_start"
echo "block_end: $block_end"
echo "batch_size: $batch_size"
echo "cpu_cycles: $cpu_cycles"
./tools/run-benchmark.sh ${{ inputs.machine_type }} ${{ inputs.num_workers }} ${{ inputs.cpu_request }} ${{ inputs.cpu_limit }} ${{ inputs.memory }} ${{ inputs.memory }} $block_start $block_end ${{ inputs.other_args }} ${{ inputs.rpc_endpoint }} $batch_size $cpu_cycles