Remove old benchmarks

This commit is contained in:
Steven Fackler
2018-10-14 16:57:32 -07:00
parent 05ef00a2a1
commit 6f9b36a09a

View File

@@ -1,28 +0,0 @@
#![feature(test)]
extern crate test;
extern crate postgres;
use postgres::{Connection, TlsMode};
#[bench]
fn bench_naiive_execute(b: &mut test::Bencher) {
let conn = Connection::connect("postgres://postgres@localhost:5433", TlsMode::None).unwrap();
conn.execute("CREATE TEMPORARY TABLE foo (id INT)", &[])
.unwrap();
b.iter(|| {
let stmt = conn.prepare("UPDATE foo SET id = 1").unwrap();
let out = stmt.execute(&[]).unwrap();
stmt.finish().unwrap();
out
});
}
#[bench]
fn bench_execute(b: &mut test::Bencher) {
let conn = Connection::connect("postgres://postgres@localhost:5433", TlsMode::None).unwrap();
conn.execute("CREATE TEMPORARY TABLE foo (id INT)", &[])
.unwrap();
b.iter(|| conn.execute("UPDATE foo SET id = 1", &[]).unwrap());
}