Silence compiler warnings in example code

This commit is contained in:
Heikki Linnakangas
2025-06-17 02:07:33 +03:00
parent 83007782fd
commit b603e3dddb
2 changed files with 4 additions and 7 deletions

View File

@@ -12,7 +12,6 @@ use tokio::task;
use tokio::time::sleep;
use rand::Rng;
use tonic::Status;
use uuid::Uuid;
// Pull in your ConnectionPool and PooledItemFactory from the pageserver_client_grpc crate.
// Adjust these paths if necessary.

View File

@@ -13,7 +13,7 @@ use pageserver_client_grpc::AuthInterceptor;
use pageserver_client_grpc::client_cache::ChannelFactory;
use tonic::{transport::{Channel}, Request};
use tonic::transport::Channel;
use rand::prelude::*;
@@ -21,13 +21,11 @@ use pageserver_api::key::Key;
use utils::lsn::Lsn;
use utils::id::TenantTimelineId;
use utils::shard::ShardIndex;
use futures::stream::FuturesOrdered;
use futures::StreamExt;
// use chrono
use chrono::Utc;
use pageserver_page_api::{GetPageClass, GetPageResponse};
use pageserver_page_api::proto;
#[derive(Clone)]
struct KeyRange {
@@ -107,7 +105,7 @@ async fn main() {
// 4) fire off 10 000 requests in parallel
let mut handles = FuturesOrdered::new();
for i in 0..500000 {
for _i in 0..500000 {
let mut rng = rand::thread_rng();
let r = 0..=1000000i128;
@@ -150,7 +148,7 @@ async fn main() {
// print timestamp
println!("Starting 5000000 requests at: {}", chrono::Utc::now());
// 5) wait for them all
for i in 0..500000 {
for _i in 0..500000 {
handles.next().await.expect("Failed to get next handle");
}