diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-03-05 11:07:41 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-03-05 11:11:36 +0200 |
commit | 57d11bd2f4823387a0b1a421428d554c6608cf5e (patch) | |
tree | d45682576334a1119f58399435c5ced34e89d6c2 | |
parent | 98c05a775deb686761d550a736506a1aafef6d12 (diff) | |
download | obnam2-57d11bd2f4823387a0b1a421428d554c6608cf5e.tar.gz |
fix: generate deterministic chunk ids for benchmarks
This allows us to generate the same sequence many times.
-rw-r--r-- | src/benchmark.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/benchmark.rs b/src/benchmark.rs index b313868..b484aa1 100644 --- a/src/benchmark.rs +++ b/src/benchmark.rs @@ -21,7 +21,7 @@ impl Iterator for ChunkGenerator { if self.next >= self.goal { None } else { - let id = ChunkId::new(); + let id = ChunkId::from_str(&format!("{}", self.next)); let checksum = id.sha256(); let meta = ChunkMeta::new(&checksum); let chunk = DataChunk::new(vec![]); |