mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 09:05:55 +00:00
add importRoaring small updates benchmark
This commit is contained in:
parent
19807ff3a7
commit
d0f8304f1c
1 changed files with 34 additions and 0 deletions
|
|
@ -766,6 +766,40 @@ func BenchmarkFragment_RepeatedSmallImports(b *testing.B) {
|
|||
}
|
||||
}
|
||||
|
||||
func BenchmarkFragment_RepeatedSmallImportsRoaring(b *testing.B) {
|
||||
for _, numUpdates := range []int{100} {
|
||||
for _, bitsPerUpdate := range []uint64{100, 1000} {
|
||||
for _, numRows := range []uint64{1000, 100000, 1000000} {
|
||||
for _, opN := range []int{1, 5000, 50000} {
|
||||
b.Run(fmt.Sprintf("Rows%dUpdates%dBits%dOpN%d", numRows, numUpdates, bitsPerUpdate, opN), func(b *testing.B) {
|
||||
for a := 0; a < b.N; a++ {
|
||||
b.StopTimer()
|
||||
// build the update data set all at once - this will get applied
|
||||
// to a fragment in numUpdates batches
|
||||
f := mustOpenFragment("i", "f", viewStandard, 0, "")
|
||||
f.MaxOpN = opN
|
||||
defer f.Clean(b)
|
||||
err := f.importRoaring(getZipfRowsSliceRoaring(numRows, 1), false)
|
||||
if err != nil {
|
||||
b.Fatalf("importing base data for benchmark: %v", err)
|
||||
}
|
||||
for i := 0; i < numUpdates; i++ {
|
||||
data := getUpdataRoaring(numRows, bitsPerUpdate, int64(i))
|
||||
b.StartTimer()
|
||||
err := f.importRoaring(data, false)
|
||||
b.StopTimer()
|
||||
if err != nil {
|
||||
b.Fatalf("doing small roaring import: %v", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkFragment_RepeatedSmallValueImports(b *testing.B) {
|
||||
initialCols := make([]uint64, 0, ShardWidth)
|
||||
initialVals := make([]uint64, 0, ShardWidth)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue