MCPcopy Create free account
hub / github.com/GoMudEngine/GoMud / createBenchIndexFile

Function createBenchIndexFile

internal/users/index_test.go:11–19  ·  view source on GitHub ↗
(b *testing.B, filename string, recordCount int)

Source from the content-addressed store, hash-verified

9)
10
11func createBenchIndexFile(b *testing.B, filename string, recordCount int) *UserIndex {
12 b.Helper()
13 idx := &UserIndex{Filename: filename}
14 idx.Create()
15 for i := 1; i <= recordCount; i++ {
16 idx.AddUser(i*10, fmt.Sprintf("user_%d", i))
17 }
18 return idx
19}
20
21func benchTempFile(b *testing.B) (string, func()) {
22 b.Helper()

Calls 2

CreateMethod · 0.95
AddUserMethod · 0.95

Tested by

no test coverage detected