MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / benchmarkAgentDevice

Function benchmarkAgentDevice

scripts/bench/agent-control-benchmark.mjs:261–499  ·  view source on GitHub ↗
(udid)

Source from the content-addressed store, hash-verified

259}
260
261async function benchmarkAgentDevice(udid) {
262 section("agent-device");
263
264 await sample("agent-device", "tool-start", "cold", 1, async () => {
265 stopAgentDevice();
266 return run(
267 "agent-device",
268 ["devices", "--platform", "ios", "--udid", udid, "--json"],
269 { timeoutMs: 45000 },
270 );
271 });
272
273 await sample("agent-device", "tool-start", "hot", 1, async () =>
274 run(
275 "agent-device",
276 ["devices", "--platform", "ios", "--udid", udid, "--json"],
277 { timeoutMs: 20000 },
278 ),
279 );
280
281 await sample("agent-device", "list-devices", "hot", options.reps, async () =>
282 run(
283 "agent-device",
284 ["devices", "--platform", "ios", "--udid", udid, "--json"],
285 { timeoutMs: 20000 },
286 ),
287 );
288
289 await sample(
290 "agent-device",
291 "launch-settings",
292 "hot",
293 options.reps,
294 async () =>
295 run(
296 "agent-device",
297 ["open", "Settings", "--platform", "ios", "--udid", udid, "--json"],
298 { timeoutMs: 30000 },
299 ),
300 );
301
302 await sample("agent-device", "open-url", "hot", options.reps, async () =>
303 run(
304 "agent-device",
305 ["open", benchmarkUrl, "--platform", "ios", "--udid", udid, "--json"],
306 { timeoutMs: 30000 },
307 ),
308 );
309
310 await withAgentDeviceSettingsRoot(udid);
311 await sample("agent-device", "describe-full", "hot", options.reps, async () =>
312 run("agent-device", ["snapshot", "--platform", "ios", "--udid", udid], {
313 timeoutMs: 30000,
314 }),
315 );
316
317 await withAgentDeviceSettingsRoot(udid);
318 await sample(

Callers 1

mainFunction · 0.85

Calls 8

sectionFunction · 0.85
sampleFunction · 0.85
stopAgentDeviceFunction · 0.85
withNoteFunction · 0.85
currentScreenSizeFunction · 0.85
runFunction · 0.70

Tested by

no test coverage detected