mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-15 20:20:38 +00:00
This PR adds a component-level benchmarking utility for pageserver. Its name is `pagebench`. The problem solved by `pagebench` is that we want to put Pageserver under high load. This isn't easily achieved with `pgbench` because it needs to go through a compute, which has signficant performance overhead compared to accessing Pageserver directly. Further, compute has its own performance optimizations (most importantly: caches). Instead of designing a compute-facing workload that defeats those internal optimizations, `pagebench` simply bypasses them by accessing pageserver directly. Supported benchmarks: * getpage@latest_lsn * basebackup * triggering logical size calculation This code has no automated users yet. A performance regression test for getpage@latest_lsn will be added in a later PR. part of https://github.com/neondatabase/neon/issues/5771
9 lines
273 B
Rust
9 lines
273 B
Rust
pub(crate) fn connstring(host_port: &str, jwt: Option<&str>) -> String {
|
|
let colon_and_jwt = if let Some(jwt) = jwt {
|
|
format!(":{jwt}") // TODO: urlescape
|
|
} else {
|
|
String::new()
|
|
};
|
|
format!("postgres://postgres{colon_and_jwt}@{host_port}")
|
|
}
|