mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 15:51:01 +00:00
merge
This commit is contained in:
parent
0757a84f69
commit
f825bc3b80
2 changed files with 5 additions and 4 deletions
|
|
@ -1081,15 +1081,15 @@ func BenchmarkFragment_Snapshot(b *testing.B) {
|
|||
b.Skip("no fragment specified")
|
||||
}
|
||||
|
||||
b.ReportAllocs()
|
||||
// Open the fragment specified by the path.
|
||||
f := pilosa.NewFragment(*FragmentPath, "i", "f", pilosa.ViewStandard, 0)
|
||||
if err := f.Open(); err != nil {
|
||||
b.Fatal(err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
// Reset timer and execute benchmark.
|
||||
b.ResetTimer()
|
||||
// Reset timer and execute benchmark.
|
||||
for i := 0; i < b.N; i++ {
|
||||
err := f.Snapshot()
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ func TestBSFQ_CompareGo(t *testing.T) {
|
|||
}
|
||||
*/
|
||||
}
|
||||
var Result uint64
|
||||
func BenchmarkBSF(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
BSFQ(uint64(i))
|
||||
|
|
@ -62,7 +63,7 @@ func BenchmarkPOPCNTQ(b *testing.B) {
|
|||
|
||||
func BenchmarkPopcount(b *testing.B) {
|
||||
for i := 0; i < b.N; i++ {
|
||||
popcount(uint64(i))
|
||||
Result=popcount(uint64(i))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +77,7 @@ func BenchmarkPopcntAsm(b *testing.B) {
|
|||
func BenchmarkPopcntGo(b *testing.B) {
|
||||
// run the Fib function b.N times
|
||||
for n := 0; n < b.N; n++ {
|
||||
popcntGo(0xdeadbeef)
|
||||
Result=popcntGo(uint64(n))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue