Skip to content

Commit

Permalink
More helpers for testing space (#271)
Browse files Browse the repository at this point in the history
  • Loading branch information
outofforest authored Dec 4, 2024
1 parent 929e05a commit e74e14b
Show file tree
Hide file tree
Showing 7 changed files with 283 additions and 304 deletions.
7 changes: 5 additions & 2 deletions benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/outofforest/quantum"
"github.com/outofforest/quantum/alloc"
"github.com/outofforest/quantum/persistent"
"github.com/outofforest/quantum/space"
"github.com/outofforest/quantum/tx/genesis"
"github.com/outofforest/quantum/tx/transfer"
txtypes "github.com/outofforest/quantum/tx/types"
Expand Down Expand Up @@ -110,6 +111,8 @@ func BenchmarkBalanceTransfer(b *testing.B) {
panic(err)
}

st := space.NewSpaceTest(s, nil, nil, nil, nil)

hashBuff := s.NewHashBuff()
hashMatches := s.NewHashMatches()

Expand All @@ -126,7 +129,7 @@ func BenchmarkBalanceTransfer(b *testing.B) {
panic(err)
}

fmt.Println(s.Stats())
fmt.Println(st.Stats())
fmt.Println("===========================")

genesisBalance, genesisExists := s.Query(txtypes.GenesisAccount, hashBuff, hashMatches)
Expand Down Expand Up @@ -167,7 +170,7 @@ func BenchmarkBalanceTransfer(b *testing.B) {
}()

func() {
fmt.Println(s.Stats())
fmt.Println(st.Stats())

genesisBalance, genesisExists := s.Query(txtypes.GenesisAccount, hashBuff, hashMatches)
require.True(b, genesisExists)
Expand Down
57 changes: 0 additions & 57 deletions space/collission_test.go

This file was deleted.

Loading

0 comments on commit e74e14b

Please sign in to comment.