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

Function benchmarkSimDeck

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

Source from the content-addressed store, hash-verified

98}
99
100async function benchmarkSimDeck(udid) {
101 section("simdeck");
102
103 await sample("simdeck", "tool-start", "cold", 1, async () => {
104 run(simdeckBin, ["service", "stop"], {
105 allowFailure: true,
106 timeoutMs: 5000,
107 });
108 return run(simdeckBin, ["service", "start", "--port", "4310"], {
109 timeoutMs: 20000,
110 });
111 });
112
113 await sample("simdeck", "tool-start", "hot", 1, async () =>
114 run(simdeckBin, ["service", "start", "--port", "4310"], {
115 timeoutMs: 10000,
116 }),
117 );
118
119 run(simdeckBin, ["use", udid], { timeoutMs: 10000, allowFailure: true });
120
121 await sample("simdeck", "list-devices", "hot", options.reps, async () =>
122 run(simdeckBin, ["list", "--format", "compact-json"], { timeoutMs: 10000 }),
123 );
124
125 await sample("simdeck", "launch-settings", "hot", options.reps, async () =>
126 run(simdeckBin, ["launch", settingsBundleId], { timeoutMs: 15000 }),
127 );
128
129 await sample("simdeck", "open-url", "hot", options.reps, async () =>
130 run(simdeckBin, ["open-url", benchmarkUrl], { timeoutMs: 15000 }),
131 );
132
133 await withSettingsRoot(udid);
134 await sample("simdeck", "describe-full", "hot", options.reps, async () =>
135 run(simdeckBin, ["describe", "--format", "agent", "--max-depth", "8"], {
136 timeoutMs: 10000,
137 }),
138 );
139
140 await withSettingsRoot(udid);
141 await sample(
142 "simdeck",
143 "describe-interactive",
144 "hot",
145 options.reps,
146 async () =>
147 run(
148 simdeckBin,
149 ["describe", "--format", "agent", "--max-depth", "8", "-i"],
150 { timeoutMs: 10000 },
151 ),
152 );
153
154 await withSettingsRoot(udid);
155 await sample(
156 "simdeck",
157 "wait-visible-screen-time",

Callers 1

mainFunction · 0.85

Calls 5

sectionFunction · 0.85
sampleFunction · 0.85
withSettingsRootFunction · 0.85
withSettingsPaneFunction · 0.85
runFunction · 0.70

Tested by

no test coverage detected