MCPcopy Create free account
hub / github.com/sergi/go-diff / BenchmarkDiffMainRunesLargeLines

Function BenchmarkDiffMainRunesLargeLines

diffmatchpatch/diff_test.go:1546–1559  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

1544}
1545
1546func BenchmarkDiffMainRunesLargeLines(b *testing.B) {
1547 s1, s2 := speedtestTexts()
1548
1549 dmp := New()
1550
1551 b.ResetTimer()
1552
1553 for i := 0; i < b.N; i++ {
1554 text1, text2, linearray := dmp.DiffLinesToRunes(s1, s2)
1555
1556 diffs := dmp.DiffMainRunes(text1, text2, false)
1557 diffs = dmp.DiffCharsToLines(diffs, linearray)
1558 }
1559}
1560
1561func BenchmarkDiffMainRunesLargeDiffLines(b *testing.B) {
1562 fp, _ := os.Open("../testdata/diff10klinestest.txt")

Callers

nothing calls this directly

Calls 5

speedtestTextsFunction · 0.85
NewFunction · 0.85
DiffLinesToRunesMethod · 0.80
DiffMainRunesMethod · 0.80
DiffCharsToLinesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…