MCPcopy Create free account
hub / github.com/codechenx/FastTableViewer / BenchmarkSepDetect_Comma

Function BenchmarkSepDetect_Comma

sepDector_test.go:263–276  ·  view source on GitHub ↗

======================================== Performance Tests ========================================

(b *testing.B)

Source from the content-addressed store, hash-verified

261// ========================================
262
263func BenchmarkSepDetect_Comma(b *testing.B) {
264 sd := sepDetecor{}
265 lines := []string{
266 "Name,Age,City,Country,Score",
267 "Alice,30,NYC,USA,95",
268 "Bob,25,LA,USA,87",
269 "Charlie,35,Chicago,USA,92",
270 }
271
272 b.ResetTimer()
273 for i := 0; i < b.N; i++ {
274 sd.sepDetect(lines)
275 }
276}
277
278func BenchmarkCountRuneFast(b *testing.B) {
279 s := "a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z"

Callers

nothing calls this directly

Calls 1

sepDetectMethod · 0.95

Tested by

no test coverage detected