MCPcopy Create free account
hub / github.com/github/gh-aw / BenchmarkTruncate

Function BenchmarkTruncate

pkg/stringutil/stringutil_test.go:162–167  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

160}
161
162func BenchmarkTruncate(b *testing.B) {
163 s := "this is a very long string that needs to be truncated for testing purposes"
164 for b.Loop() {
165 Truncate(s, 30)
166 }
167}
168
169func BenchmarkNormalizeWhitespace(b *testing.B) {
170 content := "line1 \nline2\t\nline3 \t\nline4\n\n"

Callers

nothing calls this directly

Calls 1

TruncateFunction · 0.85

Tested by

no test coverage detected