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

Function service_post_sample

packages/server/src/main/service_client.rs:44–60  ·  view source on GitHub ↗
(
    server_url: &str,
    udid: &str,
    pid: i32,
    seconds: u64,
)

Source from the content-addressed store, hash-verified

42}
43
44fn service_post_sample(
45 server_url: &str,
46 udid: &str,
47 pid: i32,
48 seconds: u64,
49) -> anyhow::Result<Value> {
50 http_request_json(
51 server_url,
52 "POST",
53 &format!(
54 "/api/simulators/{}/processes/{pid}/sample?seconds={}",
55 url_path_component(udid),
56 seconds.clamp(1, 30)
57 ),
58 None,
59 )
60}
61
62fn run_stats_watch(
63 server_url: &str,

Callers 1

mainFunction · 0.85

Calls 1

http_request_jsonFunction · 0.85

Tested by

no test coverage detected