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

Function BenchmarkTruncate_Long

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

Source from the content-addressed store, hash-verified

289}
290
291func BenchmarkTruncate_Long(b *testing.B) {
292 s := "this is a very very very very very long string that definitely needs truncation"
293 for b.Loop() {
294 Truncate(s, 20)
295 }
296}
297
298func BenchmarkNormalizeWhitespace_NoChange(b *testing.B) {
299 content := "line1\nline2\nline3\n"

Callers

nothing calls this directly

Calls 1

TruncateFunction · 0.85

Tested by

no test coverage detected