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

Function BenchmarkDiffCleanupSemantic

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

Source from the content-addressed store, hash-verified

870}
871
872func BenchmarkDiffCleanupSemantic(b *testing.B) {
873 s1, s2 := speedtestTexts()
874
875 dmp := New()
876
877 diffs := dmp.DiffMain(s1, s2, false)
878
879 b.ResetTimer()
880
881 for i := 0; i < b.N; i++ {
882 dmp.DiffCleanupSemantic(diffs)
883 }
884}
885
886func TestDiffCleanupEfficiency(t *testing.T) {
887 type TestCase struct {

Callers

nothing calls this directly

Calls 4

speedtestTextsFunction · 0.85
NewFunction · 0.85
DiffMainMethod · 0.80
DiffCleanupSemanticMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…