(endpoint: PglitePreparedEndpoint)
| 2999 | } |
| 3000 | |
| 3001 | fn start_prepared_update_pglite_server(endpoint: PglitePreparedEndpoint) -> Result<PgliteServer> { |
| 3002 | match endpoint { |
| 3003 | PglitePreparedEndpoint::Tcp => PgliteServer::temporary_tcp(), |
| 3004 | #[cfg(unix)] |
| 3005 | PglitePreparedEndpoint::Unix => { |
| 3006 | let socket_dir = env::current_dir() |
| 3007 | .context("read current directory")? |
| 3008 | .join("target/perf") |
| 3009 | .join(format!( |
| 3010 | "pglite-prepared-unix-{}-{}", |
| 3011 | std::process::id(), |
| 3012 | now_micros()? |
| 3013 | )); |
| 3014 | let port = 5432; |
| 3015 | let socket_path = socket_dir.join(format!(".s.PGSQL.{port}")); |
| 3016 | PgliteServer::builder() |
| 3017 | .temporary() |
| 3018 | .unix(socket_path) |
| 3019 | .start() |
| 3020 | } |
| 3021 | } |
| 3022 | } |
| 3023 | |
| 3024 | enum PreparedPgliteConnection { |
| 3025 | Tcp(std::net::SocketAddr), |
no test coverage detected