@@ -56,7 +56,14 @@ ai.set_ethernet_mode(ip_address='192.168.10.62')
5656ai.all_on()
5757ai.all_off()
5858ai.stream_frame(path = ' ./patterns/pat0004.pat' , frame_index = 0 , analog_output_value = 2048 )
59- ai.stream_frames(path = ' ./patterns/pat0004.pat' , frame_rate = 20 , runtime_duration = 50 )
59+ ai.stream_frames(
60+ pattern_path = ' ./patterns/pat0004.pat' ,
61+ frame_rate = 20 ,
62+ runtime_duration = 50 ,
63+ analog_out_waveform = ' constant' ,
64+ analog_update_rate = 1.0 ,
65+ analog_frequency = 0.0 ,
66+ )
6067ai.play_pattern(pattern_id = 3 , frame_rate = 20 , runtime_duration = 50 )
6168ai.play_pattern(pattern_id = 3 , frame_rate = - 20 , runtime_duration = 50 )
6269ai.play_pattern(pattern_id = 3 , frame_rate = 20 , runtime_duration = 50 , initial_frame_index = 4 )
@@ -149,10 +156,53 @@ Options:
149156
1501573. benchmarking
151158
159+ Benchmarks are available as methods on ` ArenaInterface` (handy in IPython)
160+ and via the CLI. Host-side results are most useful paired with QS log
161+ capture so you can compare firmware-side ` PERF_* ` events alongside the
162+ host-side timings.
163+
164+ ` ` ` python
165+ from arena_interface import ArenaInterface
166+
167+ ai = ArenaInterface(debug=True)
168+ ai.set_ethernet_mode(" 192.168.10.104" )
169+
170+ # 1) Small command RTT (latency)
171+ ai.bench_command_rtt(iters=2000)
172+
173+ # 2) SPF update loop (paced vs max)
174+ ai.bench_spf_updates(rate_hz=200, seconds=5, pattern_id=10, pacing=" target" )
175+ ai.bench_spf_updates(rate_hz=200, seconds=5, pattern_id=10, pacing=" max" )
176+
177+ # 3) Stream frames (throughput) - accepts .pat or .pattern
178+ ai.bench_stream_frames(" ./patterns/pat0004.pat" , frame_rate=200, seconds=5, progress_interval_s=0)
179+
180+ # 4) Full suite + save JSONL for later comparison across switches/hosts
181+ suite = ai.bench_suite(
182+ label=" lab-switch-A / laptop-1" ,
183+ include_connect=True,
184+ stream_path=" ./patterns/pat0004.pat" ,
185+ )
186+ ai.write_bench_jsonl(" bench_results.jsonl" , suite)
187+ ` ` `
188+
152189 ` ` ` sh
153- python -m arena_interface.cli --ethernet 192.168.x.x bench --stream-path my.pattern
190+ arena-interface --ethernet 192.168.10.104 bench \
191+ --label " lab-switch-A / laptop-1" \
192+ --json-out bench_results.jsonl \
193+ --include-connect \
194+ --cmd-connect-mode persistent \
195+ --spf-pacing target \
196+ --stream-path ./patterns/pat0004.pat
154197 ` ` `
155198
199+ Tips for comparing Ethernet switches/hosts/LANs:
200+
201+ - Keep the firmware build and the pattern file constant across runs.
202+ - Vary only the network path (switch/cable/VLAN/host) and change ` --label` .
203+ - Capture QS logs in parallel so you can analyze device-side ` PERF_UPD` and
204+ ` PERF_NET` alongside the host-side results.
205+
156206
157207< a id=" org024f908" ></a>
158208
0 commit comments