MCPcopy Index your code
hub / github.com/codechenx/FastTableViewer / BenchmarkWithoutInterning

Function BenchmarkWithoutInterning

string_interning_test.go:265–282  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

263}
264
265func BenchmarkWithoutInterning(b *testing.B) {
266 categories := []string{"Active", "Inactive", "Pending", "Completed", "Failed"}
267 data := [][]string{{"Status", "ID"}}
268
269 for i := 0; i < 1000; i++ {
270 data = append(data, []string{
271 categories[i%len(categories)],
272 fmt.Sprintf("%d", i),
273 })
274 }
275
276 b.ResetTimer()
277 for i := 0; i < b.N; i++ {
278 buf, _ := createNewBufferWithData(data, false)
279 buf.rowFreeze = 1
280 // No interning
281 }
282}

Callers

nothing calls this directly

Calls 1

createNewBufferWithDataFunction · 0.85

Tested by

no test coverage detected