Skip to main content

ping/
ping.rs

1//! Manual probe: exercise the GitHub client exactly as the worker does.
2//! Run: cargo run --example ping
3
4fn main() {
5    let client = rootle_github::client::GitHubClient::new();
6    println!("anonymous: {}", client.is_anonymous());
7
8    let t0 = std::time::Instant::now();
9    match client.search("ratatui") {
10        Ok(items) => println!("search ok in {:?}: {} items", t0.elapsed(), items.len()),
11        Err(e) => println!("search ERR in {:?}: {e}", t0.elapsed()),
12    }
13
14    let t1 = std::time::Instant::now();
15    match client.org_repos("ratatui") {
16        Ok(repos) => println!("org ok in {:?}: {} repos", t1.elapsed(), repos.len()),
17        Err(e) => println!("org ERR in {:?}: {e}", t1.elapsed()),
18    }
19}