MCPcopy
hub / github.com/syncthing/syncthing / BenchmarkUnifySubs

Function BenchmarkUnifySubs

lib/model/folder_test.go:134–146  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

132}
133
134func BenchmarkUnifySubs(b *testing.B) {
135 cases := unifySubsCases()
136 b.ReportAllocs()
137 b.ResetTimer()
138 for i := 0; i < b.N; i++ {
139 for _, tc := range cases {
140 exists := func(f string) bool {
141 return slices.Contains(tc.exists, f)
142 }
143 unifySubs(tc.in, exists)
144 }
145 }
146}
147
148func TestSetPlatformData(t *testing.T) {
149 // Checks that setPlatformData runs without error when applied to a temp

Callers

nothing calls this directly

Calls 3

unifySubsCasesFunction · 0.85
unifySubsFunction · 0.85
ContainsMethod · 0.80

Tested by

no test coverage detected