Skip to content

Commit 10d7ba9

Browse files
committed
add persistent test fixtures and fix dummy profile staging
1 parent ef51082 commit 10d7ba9

File tree

4 files changed

+474
-2
lines changed

4 files changed

+474
-2
lines changed

.github/workflows/performance.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ jobs:
1717
- name: Prepare Dummy Profiles
1818
run: |
1919
mkdir -p artifacts/capture
20-
cp artifacts/capture/baseline.json artifacts/capture/current_profile.json
20+
cp tests/fixtures/baseline.json artifacts/capture/baseline.json
21+
cp tests/fixtures/current_profile.json artifacts/capture/current_profile.json
2122
2223
- name: Run Stylus Performance Check
2324
uses: ./
2425
with:
2526
tx_hash: "0xaaf333656d069068844d17f175fa5b73534c0b71599100bee2153791c3e81edc"
2627
rpc_url: "https://sepolia-rollup.arbitrum.io/rpc"
27-
threshold: "1"
28+
threshold: "10"
2829
skip_capture: "true"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ target
55
.DS_Store
66
*.svg
77
*.json
8+
!tests/fixtures/*.json
89
profiles/
910
flamegraphs.svg
1011
profile.json

tests/fixtures/baseline.json

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
{
2+
"version": "1.0.0",
3+
"transaction_hash": "0x47404c910245f1bf9759ca9a62a13358478e2ea72bcc896c8e0096ad6ef25e3b",
4+
"total_gas": 460111929,
5+
"hostio_summary": {
6+
"total_calls": 15,
7+
"by_type": {
8+
"msg_sender": 1,
9+
"storage_flush_cache": 1,
10+
"read_args": 1,
11+
"write_result": 1,
12+
"storage_load": 2,
13+
"other": 3,
14+
"storage_cache": 2,
15+
"msg_value": 1,
16+
"emit_log": 1,
17+
"msg_reentrant": 1,
18+
"native_keccak256": 1
19+
},
20+
"total_hostio_gas": 460111929
21+
},
22+
"hot_paths": [
23+
{
24+
"stack": "storage_flush_cache",
25+
"gas": 400068073,
26+
"percentage": 86.9501631634506,
27+
"source_hint": {
28+
"file": "unknown",
29+
"line": null,
30+
"column": null,
31+
"function": "0x0"
32+
}
33+
},
34+
{
35+
"stack": "storage_load_bytes32",
36+
"gas": 42136960,
37+
"percentage": 9.15798034004026,
38+
"source_hint": {
39+
"file": "unknown",
40+
"line": null,
41+
"column": null,
42+
"function": "0x0"
43+
}
44+
},
45+
{
46+
"stack": "emit_log",
47+
"gas": 17649734,
48+
"percentage": 3.835965313561779,
49+
"source_hint": {
50+
"file": "unknown",
51+
"line": null,
52+
"column": null,
53+
"function": "0x0"
54+
}
55+
},
56+
{
57+
"stack": "native_keccak256",
58+
"gas": 121800,
59+
"percentage": 0.026471819642824346,
60+
"source_hint": {
61+
"file": "unknown",
62+
"line": null,
63+
"column": null,
64+
"function": "0x0"
65+
}
66+
},
67+
{
68+
"stack": "write_result",
69+
"gas": 41162,
70+
"percentage": 0.008946084073382066,
71+
"source_hint": {
72+
"file": "unknown",
73+
"line": null,
74+
"column": null,
75+
"function": "0x0"
76+
}
77+
},
78+
{
79+
"stack": "storage_cache_bytes32",
80+
"gas": 36960,
81+
"percentage": 0.008032828029546697,
82+
"source_hint": {
83+
"file": "unknown",
84+
"line": null,
85+
"column": null,
86+
"function": "0x0"
87+
}
88+
},
89+
{
90+
"stack": "read_args",
91+
"gas": 13560,
92+
"percentage": 0.0029471089848661586,
93+
"source_hint": {
94+
"file": "unknown",
95+
"line": null,
96+
"column": null,
97+
"function": "0x0"
98+
}
99+
},
100+
{
101+
"stack": "msg_value",
102+
"gas": 13440,
103+
"percentage": 0.0029210283743806176,
104+
"source_hint": {
105+
"file": "unknown",
106+
"line": null,
107+
"column": null,
108+
"function": "0x0"
109+
}
110+
},
111+
{
112+
"stack": "msg_sender",
113+
"gas": 13440,
114+
"percentage": 0.0029210283743806176,
115+
"source_hint": {
116+
"file": "unknown",
117+
"line": null,
118+
"column": null,
119+
"function": "0x0"
120+
}
121+
},
122+
{
123+
"stack": "msg_reentrant",
124+
"gas": 8400,
125+
"percentage": 0.0018256427339878858,
126+
"source_hint": {
127+
"file": "unknown",
128+
"line": null,
129+
"column": null,
130+
"function": "0x0"
131+
}
132+
},
133+
{
134+
"stack": "pay_for_memory_grow",
135+
"gas": 8400,
136+
"percentage": 0.0018256427339878858,
137+
"source_hint": {
138+
"file": "unknown",
139+
"line": null,
140+
"column": null,
141+
"function": "0x0"
142+
}
143+
},
144+
{
145+
"stack": "user_returned",
146+
"gas": 0,
147+
"percentage": 0.0,
148+
"source_hint": {
149+
"file": "unknown",
150+
"line": null,
151+
"column": null,
152+
"function": "0x0"
153+
}
154+
},
155+
{
156+
"stack": "user_entrypoint",
157+
"gas": 0,
158+
"percentage": 0.0,
159+
"source_hint": {
160+
"file": "unknown",
161+
"line": null,
162+
"column": null,
163+
"function": "0x0"
164+
}
165+
}
166+
],
167+
"all_stacks": [
168+
{
169+
"stack": "storage_flush_cache",
170+
"weight": 400068073,
171+
"last_pc": 0
172+
},
173+
{
174+
"stack": "storage_load_bytes32",
175+
"weight": 42136960,
176+
"last_pc": 0
177+
},
178+
{
179+
"stack": "emit_log",
180+
"weight": 17649734,
181+
"last_pc": 0
182+
},
183+
{
184+
"stack": "native_keccak256",
185+
"weight": 121800,
186+
"last_pc": 0
187+
},
188+
{
189+
"stack": "write_result",
190+
"weight": 41162,
191+
"last_pc": 0
192+
},
193+
{
194+
"stack": "storage_cache_bytes32",
195+
"weight": 36960,
196+
"last_pc": 0
197+
},
198+
{
199+
"stack": "read_args",
200+
"weight": 13560,
201+
"last_pc": 0
202+
},
203+
{
204+
"stack": "msg_value",
205+
"weight": 13440,
206+
"last_pc": 0
207+
},
208+
{
209+
"stack": "msg_sender",
210+
"weight": 13440,
211+
"last_pc": 0
212+
},
213+
{
214+
"stack": "msg_reentrant",
215+
"weight": 8400,
216+
"last_pc": 0
217+
},
218+
{
219+
"stack": "pay_for_memory_grow",
220+
"weight": 8400,
221+
"last_pc": 0
222+
},
223+
{
224+
"stack": "user_returned",
225+
"weight": 0,
226+
"last_pc": 0
227+
},
228+
{
229+
"stack": "user_entrypoint",
230+
"weight": 0,
231+
"last_pc": 0
232+
}
233+
],
234+
"generated_at": "2026-02-19T00:39:29.748484086+00:00"
235+
}

0 commit comments

Comments
 (0)