aboutsummaryrefslogtreecommitdiffstats
path: root/log_db/benches/utils.rs
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2024-11-22 10:27:02 +0200
committerJan Tuomi <jan@jantuomi.fi>2024-11-22 10:27:02 +0200
commit0e53a1c99ddffcb3d8f58e8942b878ff720684e1 (patch)
tree6d5b5fc2d6f418d54dee7b935edc7a459a8f3470 /log_db/benches/utils.rs
parent0182fd123a1ff6cb08826f824d76693d61fafb1c (diff)
Fix benchmark so that it compiles
Diffstat (limited to 'log_db/benches/utils.rs')
-rw-r--r--log_db/benches/utils.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/log_db/benches/utils.rs b/log_db/benches/utils.rs
index a62162e..afa899a 100644
--- a/log_db/benches/utils.rs
+++ b/log_db/benches/utils.rs
@@ -24,13 +24,11 @@ pub fn random_bytes(len: usize) -> Vec<u8> {
// Function to generate a random record
pub fn random_record(from_id: i64, to_id: i64) -> Record {
- Record {
- values: vec![
- Value::Int(random_int(from_id, to_id)), // Random int value between 0..1000
- Value::String(random_string(5)), // Random string of length 5
- Value::Bytes(random_bytes(10)), // Random bytes of length 10
- ],
- }
+ Record::from(&[
+ Value::Int(random_int(from_id, to_id)), // Random int value between 0..1000
+ Value::String(random_string(5)), // Random string of length 5
+ Value::Bytes(random_bytes(10)), // Random bytes of length 10
+ ])
}
pub fn prefill_db<T: Eq + Clone + Debug>(