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

Function fetchSimulatorPerformance

packages/client/src/api/simulators.ts:147–167  ·  view source on GitHub ↗
(
  udid: string,
  options: {
    pid?: number | null;
    windowMs?: number;
    request?: RequestInit;
  } = {},
)

Source from the content-addressed store, hash-verified

145}
146
147export async function fetchSimulatorPerformance(
148 udid: string,
149 options: {
150 pid?: number | null;
151 windowMs?: number;
152 request?: RequestInit;
153 } = {},
154): Promise<SimulatorPerformanceResponse> {
155 const params = new URLSearchParams();
156 if (options.pid != null) {
157 params.set("pid", String(options.pid));
158 }
159 if (options.windowMs != null) {
160 params.set("windowMs", String(options.windowMs));
161 }
162 const query = params.size > 0 ? `?${params}` : "";
163 return apiRequest<SimulatorPerformanceResponse>(
164 `/api/simulators/${encodeURIComponent(udid)}/performance${query}`,
165 options.request ?? {},
166 );
167}
168
169export async function sampleSimulatorProcess(
170 udid: string,

Callers 1

refreshFunction · 0.90

Calls 2

apiRequestFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected