Naive size-based compaction
This adds naive compaction that tries to compact three
blocks of roughly equal size.
It decides based on samples present in a block and has no
safety measures considering the actual file size.
@@ -91,7 +91,7 @@ func (b *writeBenchmark) run(cmd *cobra.Command, args []string) {
dir := filepath.Join(b.outPath, "storage")
- st, err := tsdb.OpenPartitioned(dir, 1, nil, nil)
+ st, err := tsdb.OpenPartitioned(dir, 8, nil, nil)
if err != nil {
exitWithError(err)
}
