MCPcopy Index your code
hub / github.com/expr-lang/expr / benchmarkSplitLines

Function benchmarkSplitLines

internal/difflib/difflib_test.go:409–418  ·  view source on GitHub ↗
(b *testing.B, count int)

Source from the content-addressed store, hash-verified

407}
408
409func benchmarkSplitLines(b *testing.B, count int) {
410 str := strings.Repeat("foo\n", count)
411
412 b.ResetTimer()
413
414 n := 0
415 for i := 0; i < b.N; i++ {
416 n += len(SplitLines(str))
417 }
418}
419
420func BenchmarkSplitLines100(b *testing.B) {
421 benchmarkSplitLines(b, 100)

Callers 2

BenchmarkSplitLines100Function · 0.85
BenchmarkSplitLines10000Function · 0.85

Calls 1

SplitLinesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…