MCPcopy Create free account
hub / github.com/cogentcore/core / BenchmarkMatcher

Function BenchmarkMatcher

texteditor/difflib/bytes/bytes_test.go:508–521  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

506}
507
508func BenchmarkMatcher(b *testing.B) {
509 As, Bs := prepareFilesToDiff(b.N, 0)
510 fmt.Printf("\nOpcodes count:")
511 b.ResetTimer()
512 for i := range As {
513 var x []OpCode
514 for n := 0; n < 5; n++ {
515 sm := NewMatcher(As[i], Bs[i])
516 x = sm.GetOpCodes()
517 }
518 fmt.Printf(" %v", len(x))
519 }
520 fmt.Printf("\n")
521}
522
523func TestDifferCompare(t *testing.T) {
524 diff := NewDiffer()

Callers

nothing calls this directly

Calls 4

prepareFilesToDiffFunction · 0.70
NewMatcherFunction · 0.70
PrintfMethod · 0.45
GetOpCodesMethod · 0.45

Tested by

no test coverage detected