Skip to content

Commit b0d7bb3

Browse files
committed
feat: update
1 parent c02f3df commit b0d7bb3

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

frameworks/Rust/hyperlane/Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/Rust/hyperlane/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hyperlane_techempower"
3-
version = "0.0.1"
3+
version = "0.1.0"
44
edition = "2024"
55
authors = ["ltpp-universe <[email protected]>"]
66
license = "MIT"
@@ -18,7 +18,7 @@ exclude = [
1818
]
1919

2020
[dependencies]
21-
hyperlane = "4.94.0"
21+
hyperlane = "4.96.0"
2222
rand = "0.9.1"
2323
serde = "1.0.219"
2424
sqlx = { version = "0.8.5", features = ["runtime-tokio", "postgres"] }

frameworks/Rust/hyperlane/src/db.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub fn get_db_connection() -> &'static DbPoolConnection {
88
pub async fn create_database() {
99
let db_pool: &DbPoolConnection = get_db_connection();
1010
let _ = query(&format!("CREATE DATABASE {};", DATABASE_NAME))
11-
.execute(&db_pool)
11+
.execute(db_pool)
1212
.await;
1313
}
1414

@@ -21,23 +21,23 @@ pub async fn create_table() {
2121
);",
2222
TABLE_NAME_WORLD
2323
))
24-
.execute(&db_pool)
24+
.execute(db_pool)
2525
.await;
2626
let _ = query(&format!(
2727
"CREATE TABLE IF NOT EXISTS {} (
2828
id SERIAL PRIMARY KEY, message VARCHAR NOT NULL
2929
);",
3030
TABLE_NAME_FORTUNE
3131
))
32-
.execute(&db_pool)
32+
.execute(db_pool)
3333
.await;
3434
}
3535

3636
#[cfg(feature = "dev")]
3737
pub async fn insert_records() {
3838
let db_pool: &DbPoolConnection = get_db_connection();
3939
let row: PgRow = query(&format!("SELECT COUNT(*) FROM {}", TABLE_NAME_WORLD))
40-
.fetch_one(&db_pool)
40+
.fetch_one(db_pool)
4141
.await
4242
.unwrap();
4343
let count: i64 = row.get(0);
@@ -56,7 +56,7 @@ pub async fn insert_records() {
5656
TABLE_NAME_WORLD,
5757
values.join(",")
5858
);
59-
let _ = query(&sql).execute(&db_pool).await;
59+
let _ = query(&sql).execute(db_pool).await;
6060
let mut values: Vec<String> = Vec::new();
6161
for _ in 0..missing_count {
6262
let random_number: i32 = get_random_id();
@@ -67,7 +67,7 @@ pub async fn insert_records() {
6767
TABLE_NAME_FORTUNE,
6868
values.join(",")
6969
);
70-
let _ = query(&sql).execute(&db_pool).await;
70+
let _ = query(&sql).execute(db_pool).await;
7171
}
7272

7373
pub async fn init_cache() -> Vec<QueryRow> {

frameworks/Rust/hyperlane/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub(crate) use hyperlane::{
1818
serde::*,
1919
serde_json::{Value, json},
2020
tokio::{
21+
runtime::{Builder, Runtime},
2122
spawn,
2223
sync::{AcquireError, OwnedSemaphorePermit, Semaphore},
2324
task::JoinHandle,

frameworks/Rust/hyperlane/src/server.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
use crate::*;
2-
use tokio::runtime::{Builder, Runtime};
32

43
fn runtime() -> Runtime {
54
Builder::new_multi_thread()
65
.worker_threads(get_thread_count())
76
.thread_stack_size(1_048_576)
8-
.max_blocking_threads(10240)
9-
.max_io_events_per_tick(10240)
7+
.max_blocking_threads(1024000)
8+
.max_io_events_per_tick(1024000)
109
.enable_all()
1110
.build()
1211
.unwrap()

0 commit comments

Comments
 (0)