Skip to content

Commit 45f8593

Browse files
author
dmitrivasilyev
committed
add small bench
1 parent 6ee168c commit 45f8593

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
.junie
23
/target
34
.DS_Store
45
.direnv

src/server/authentication.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ pub(crate) async fn handle_authentication(
161161
));
162162
}
163163

164-
let server_username = user.server_username.as_ref().unwrap().clone();
165-
let server_password = user.server_password.as_ref().unwrap().clone();
164+
let server_username = user.server_username.as_ref().unwrap();
165+
let server_password = user.server_password.as_ref().unwrap();
166166

167167
let mut salt = BytesMut::with_capacity(4);
168168
stream.read_buf(&mut salt).await.map_err(|err| {

src/server/server_backend.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,10 @@ impl Server {
526526
};
527527

528528
let username = user
529-
.clone()
530529
.server_username
531-
.unwrap_or(user.clone().username);
530+
.as_ref()
531+
.unwrap_or(&user.username)
532+
.clone();
532533
// StartupMessage
533534
startup(
534535
&mut stream,
@@ -648,7 +649,7 @@ impl Server {
648649
let _idle = read_message_data(&mut stream, code as u8, len).await?;
649650

650651
let server = Server {
651-
address: address.clone(),
652+
address: address.to_owned(),
652653
stream: BufStream::new(stream),
653654
buffer: BytesMut::with_capacity(8196),
654655
server_parameters,
@@ -664,7 +665,7 @@ impl Server {
664665
client_server_map,
665666
connected_at: chrono::offset::Utc::now().naive_utc(),
666667
stats,
667-
application_name: application_name.clone(),
668+
application_name,
668669
last_activity: SystemTime::now(),
669670
cleanup_connections,
670671
use_savepoint: false,

tests/bdd/pgbench_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ These benchmarks are automatically generated by the CI pipeline using `pgbench`.
10281028
### Notes
10291029
10301030
- Odyssey has poor support for extended query protocol in transaction pooling mode, resulting in significantly lower performance compared to pg_doorman and pgbouncer
1031-
- Results may vary based on hardware and system load
1031+
- **Important**: The values shown are **relative performance ratios**, not absolute TPS numbers. While absolute TPS values may vary depending on hardware and system load, the relative ratios between poolers should remain consistent when tests are run sequentially in a short timeframe (30 seconds each). This allows for fair comparison across different connection poolers under identical conditions
10321032
"#,
10331033
now.format("%Y-%m-%d %H:%M UTC"),
10341034
simple_table.join("\n"),

0 commit comments

Comments
 (0)