MCPcopy
hub / github.com/micro-editor/micro / randomText

Function randomText

internal/buffer/buffer_test.go:111–117  ·  view source on GitHub ↗
(nLines int)

Source from the content-addressed store, hash-verified

109}
110
111func randomText(nLines int) string {
112 lines := make([]string, nLines)
113 for i := range lines {
114 lines[i] = randomString(rand.Intn(maxLineLength + 1))
115 }
116 return strings.Join(lines, "\n")
117}
118
119func benchCreateAndClose(testingB *testing.B, nLines int) {
120 rand.Seed(int64(nLines))

Callers 3

benchCreateAndCloseFunction · 0.85
benchReadFunction · 0.85
benchEditFunction · 0.85

Calls 2

randomStringFunction · 0.85
JoinMethod · 0.80

Tested by

no test coverage detected