feat: Refactored all of the scaling tests and separated them out

This commit is contained in:
Nicholas Novak
2023-12-10 21:46:15 -08:00
parent 31f3c8e21d
commit 76038020f0
7 changed files with 152 additions and 59 deletions

View File

@@ -3,6 +3,7 @@ package server
import (
"git.nicholasnovak.io/nnovak/spatial-db/storage"
"git.nicholasnovak.io/nnovak/spatial-db/world"
log "github.com/sirupsen/logrus"
)
type HashServer struct {
@@ -17,8 +18,10 @@ func (hs *HashServer) SetStorageRoot(path string) {
panic(err)
}
for _, data := range chunks {
for chunkIndex, data := range chunks {
// Load in each data point from disk
log.Infof("Reading in chunk %d of %d", chunkIndex, len(chunks))
for _, section := range data.Sections {
for blockIndex, blockState := range section.BlockStates {
pos := data.IndexToBlockPos(blockIndex)