WIP benchmarking

This commit is contained in:
Daniel Akhterov 2019-06-30 21:50:08 -07:00 committed by Daniel Akhterov
parent a50c2805ba
commit 163e154073
2 changed files with 8 additions and 5 deletions

View file

@ -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();
})
});
}

View file

@ -6,5 +6,5 @@
#[macro_use]
extern crate bitflags;
mod connection;
mod protocol;
pub mod connection;
pub mod protocol;