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

Function BenchmarkDiffCleanupSemantic

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

Source from the content-addressed store, hash-verified

894}
895
896func BenchmarkDiffCleanupSemantic(b *testing.B) {
897 s1, s2 := speedtestTexts()
898
899 dmp := New()
900
901 diffs := dmp.DiffMain(s1, s2, false)
902
903 b.ResetTimer()
904
905 for i := 0; i < b.N; i++ {
906 dmp.DiffCleanupSemantic(diffs)
907 }
908}
909
910func TestDiffCleanupEfficiency(t *testing.T) {
911 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