(b *testing.B, n1, n2 int)
| 2076 | } |
| 2077 | |
| 2078 | func benchmarkTree(b *testing.B, n1, n2 int) { |
| 2079 | m, _, fcfg := setupModelWithConnection(b) |
| 2080 | defer cleanupModelAndRemoveDir(m, fcfg.Filesystem().URI()) |
| 2081 | |
| 2082 | m.ScanFolder(fcfg.ID) |
| 2083 | files := genDeepFiles(n1, n2) |
| 2084 | |
| 2085 | must(b, m.Index(device1Conn, &protocol.Index{Folder: fcfg.ID, Files: files})) |
| 2086 | |
| 2087 | b.ResetTimer() |
| 2088 | for i := 0; i < b.N; i++ { |
| 2089 | m.GlobalDirectoryTree(fcfg.ID, "", -1, false) |
| 2090 | } |
| 2091 | b.ReportAllocs() |
| 2092 | } |
| 2093 | |
| 2094 | func TestIssue3028(t *testing.T) { |
| 2095 | w, cancel := newConfigWrapper(defaultCfg) |
no test coverage detected