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

Function BenchmarkMatcher

texteditor/difflib/difflib_test.go:458–471  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

456}
457
458func BenchmarkMatcher(b *testing.B) {
459 A, B := prepareFilesToDiff(b.N, 0)
460 fmt.Printf("\nOpcodes count:")
461 b.ResetTimer()
462 for i := range A {
463 var x []OpCode
464 for n := 0; n < 5; n++ {
465 sm := NewMatcher(A[i], B[i])
466 x = sm.GetOpCodes()
467 }
468 fmt.Printf(" %v", len(x))
469 }
470 fmt.Printf("\n")
471}
472
473func TestDifferCompare(t *testing.T) {
474 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