Browse Source

Upgrade axum benchmark dependencies (#8660)

* axum: Upgrade DB dependencies

* axum: Remove unused Cargo feature

* axum: Update Cargo.lock

* axum: Upgrade rust version
Jonas Platte 1 year ago
parent
commit
ee3bb5963f

File diff suppressed because it is too large
+ 299 - 229
frameworks/Rust/axum/Cargo.lock


+ 4 - 4
frameworks/Rust/axum/Cargo.toml

@@ -29,9 +29,9 @@ name = "axum-pg"
 path = "src/main_pg.rs"
 
 [dependencies]
-axum = { version = "0.6.16", default-features = false, features = ["json", "query", "headers", "http1", "tokio"] }
-deadpool = { version = "0.9.5", features = ["rt_tokio_1", "serde", "async-trait", "managed" ] }
-deadpool-postgres = "0.10.3"
+axum = { version = "0.6.16", default-features = false, features = ["json", "query", "http1", "tokio"] }
+deadpool = { version = "0.10.0", features = ["rt_tokio_1", "serde", "async-trait", "managed" ] }
+deadpool-postgres = "0.12.1"
 dotenv = "0.15.0"
 futures = "0.3.25"
 futures-util = "0.3.25"
@@ -41,7 +41,7 @@ num_cpus = "1.14.0"
 rand = { version = "0.8.5", features = ["small_rng"] }
 serde = { version = "1.0.149", features = ["derive"] }
 serde_json = "1.0.89"
-sqlx = { version = "0.6.2", features = ["postgres", "macros", "runtime-tokio-native-tls"] }
+sqlx = { version = "0.7.3", features = ["postgres", "macros", "runtime-tokio-native-tls"] }
 tokio = { version = "1.24.2", features = ["full"] }
 tokio-pg-mapper = "0.2.0"
 tokio-pg-mapper-derive = "0.2.0"

+ 1 - 1
frameworks/Rust/axum/axum-mongo-raw.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.67-slim-buster
+FROM rust:1.75-slim-buster
 
 ENV AXUM_TECHEMPOWER_MONGODB_URL=mongodb://tfb-database:27017
 ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=28

+ 1 - 1
frameworks/Rust/axum/axum-mongo.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.67-slim-buster
+FROM rust:1.75-slim-buster
 
 ENV AXUM_TECHEMPOWER_MONGODB_URL=mongodb://tfb-database:27017
 ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=28

+ 1 - 1
frameworks/Rust/axum/axum-pg-pool.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.67-slim-buster
+FROM rust:1.75-slim-buster
 
 ENV AXUM_TECHEMPOWER_DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world
 ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=28

+ 1 - 1
frameworks/Rust/axum/axum-pg.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.67-slim-buster
+FROM rust:1.75-slim-buster
 
 ENV AXUM_TECHEMPOWER_DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world
 

+ 1 - 1
frameworks/Rust/axum/axum-sqlx.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.67-slim-buster
+FROM rust:1.75-slim-buster
 
 ENV AXUM_TECHEMPOWER_DATABASE_URL=postgres://benchmarkdbuser:benchmarkdbpass@tfb-database/hello_world
 ENV AXUM_TECHEMPOWER_MAX_POOL_SIZE=56

+ 1 - 1
frameworks/Rust/axum/axum.dockerfile

@@ -1,4 +1,4 @@
-FROM rust:1.67-slim-buster
+FROM rust:1.75-slim-buster
 
 RUN apt-get update && apt-get install -y --no-install-recommends \
     pkg-config libssl-dev \

+ 2 - 2
frameworks/Rust/axum/src/database_sqlx.rs

@@ -69,7 +69,7 @@ pub async fn fetch_world(
 
     let world: World =
         sqlx::query_as_with("SELECT id, randomnumber FROM World WHERE id = $1", args)
-            .fetch_one(&mut conn)
+            .fetch_one(&mut *conn)
             .await
             .expect("error loading world");
     Ok(world)
@@ -79,7 +79,7 @@ pub async fn fetch_fortunes(
     mut conn: PoolConnection<Postgres>,
 ) -> Result<Vec<Fortune>, PgError> {
     let fortunes: Vec<Fortune> = sqlx::query_as("SELECT * FROM Fortune")
-        .fetch_all(&mut conn)
+        .fetch_all(&mut *conn)
         .await
         .expect("error loading Fortunes");
     Ok(fortunes)

Some files were not shown because too many files changed in this diff