mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
WIP benchmarking
This commit is contained in:
parent
a50c2805ba
commit
163e154073
2 changed files with 8 additions and 5 deletions
|
@ -1,18 +1,21 @@
|
|||
#[macro_use]
|
||||
extern crate criterion;
|
||||
|
||||
use criterion::{Criterion, black_box};
|
||||
use criterion::Criterion;
|
||||
use mason_core::ConnectOptions;
|
||||
use mason_mariadb::connection::Connection;
|
||||
|
||||
fn criterion_benchmark(c: &mut Criterion) {
|
||||
c.bench_function("establish connection", |b| {
|
||||
b.iter(|| {
|
||||
let conn = Connection::establish(ConnectOptions {
|
||||
Connection::establish(ConnectOptions {
|
||||
host: "127.0.0.1",
|
||||
port: 3306,
|
||||
user: Some("root"),
|
||||
database: None,
|
||||
password: None,
|
||||
});
|
||||
})
|
||||
.await.unwarp();
|
||||
})
|
||||
});
|
||||
}
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
|
||||
mod connection;
|
||||
mod protocol;
|
||||
pub mod connection;
|
||||
pub mod protocol;
|
||||
|
|
Loading…
Reference in a new issue