diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-02-10 18:17:40 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-02-10 18:17:40 +0200 |
| commit | 591053c55753e00341bd739c00f9ff09ae6e8141 (patch) | |
| tree | debb9a661def6a9e93ad595a8bd44bfdcc2fefb9 /log_db/benches | |
| parent | eaa04ae170e57b1688bd10936a19fcb91f3409e0 (diff) | |
Remove typechecking
Diffstat (limited to 'log_db/benches')
| -rw-r--r-- | log_db/benches/benchmark.rs | 10 | ||||
| -rw-r--r-- | log_db/benches/utils.rs | 8 |
2 files changed, 7 insertions, 11 deletions
diff --git a/log_db/benches/benchmark.rs b/log_db/benches/benchmark.rs index 4c9ad47..aa4b1bb 100644 --- a/log_db/benches/benchmark.rs +++ b/log_db/benches/benchmark.rs @@ -15,7 +15,7 @@ pub fn upsert_compacted(c: &mut Criterion) { .to_str() .expect("Failed to convert tmpdir path to str"); let mut db = DB::configure() - .schema(Inst::schema()) + .fields(Inst::fields()) .primary_key(Inst::primary_key()) .secondary_keys(Inst::secondary_keys()) .from_record(Inst::from_record) @@ -47,7 +47,7 @@ pub fn delete_existing_compacted(c: &mut Criterion) { .to_str() .expect("Failed to convert tmpdir path to str"); let mut db = DB::configure() - .schema(Inst::schema()) + .fields(Inst::fields()) .primary_key(Inst::primary_key()) .secondary_keys(Inst::secondary_keys()) .from_record(Inst::from_record) @@ -86,7 +86,7 @@ pub fn upsert_write_durability(c: &mut Criterion) { .to_str() .expect("Failed to convert tmpdir path to str"); let mut db = DB::configure() - .schema(Inst::schema()) + .fields(Inst::fields()) .primary_key(Inst::primary_key()) .secondary_keys(Inst::secondary_keys()) .from_record(Inst::from_record) @@ -114,7 +114,7 @@ pub fn get_existing_compacted(c: &mut Criterion) { .to_str() .expect("Failed to convert tmpdir path to str"); let mut db = DB::configure() - .schema(Inst::schema()) + .fields(Inst::fields()) .primary_key(Inst::primary_key()) .secondary_keys(Inst::secondary_keys()) .from_record(Inst::from_record) @@ -150,7 +150,7 @@ pub fn find_by_existing_compacted(c: &mut Criterion) { .to_str() .expect("Failed to convert tmpdir path to str"); let mut db = DB::configure() - .schema(Inst::schema()) + .fields(Inst::fields()) .primary_key(Inst::primary_key()) .secondary_keys(Inst::secondary_keys()) .from_record(Inst::from_record) diff --git a/log_db/benches/utils.rs b/log_db/benches/utils.rs index 9f29cc6..3a949ae 100644 --- a/log_db/benches/utils.rs +++ b/log_db/benches/utils.rs @@ -18,12 +18,8 @@ pub struct Inst { } impl Inst { - pub fn schema() -> Vec<(Field, Type)> { - vec![ - (Field::Id, Type::int()), - (Field::Name, Type::string()), - (Field::Data, Type::bytes()), - ] + pub fn fields() -> Vec<Field> { + vec![Field::Id, Field::Name, Field::Data] } pub fn primary_key() -> Field { Field::Id |
