OLD | NEW |
1 package syncer | 1 package syncer |
2 | 2 |
3 import ( | 3 import ( |
4 "fmt" | 4 "fmt" |
5 "sort" | 5 "sort" |
6 "strings" | 6 "strings" |
7 "sync" | 7 "sync" |
8 "time" | 8 "time" |
9 | 9 |
10 "github.com/skia-dev/glog" | 10 "github.com/skia-dev/glog" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 newBinaryFuzzNames := make([]string, 0, 10) | 145 newBinaryFuzzNames := make([]string, 0, 10) |
146 for _, h := range currentBadFuzzHashes { | 146 for _, h := range currentBadFuzzHashes { |
147 if i := sort.SearchStrings(prevBadFuzzNames, h); i < len(prevBad
FuzzNames) && prevBadFuzzNames[i] == h { | 147 if i := sort.SearchStrings(prevBadFuzzNames, h); i < len(prevBad
FuzzNames) && prevBadFuzzNames[i] == h { |
148 continue | 148 continue |
149 } | 149 } |
150 newBinaryFuzzNames = append(newBinaryFuzzNames, h) | 150 newBinaryFuzzNames = append(newBinaryFuzzNames, h) |
151 } | 151 } |
152 | 152 |
153 glog.Infof("%d newly found fuzzes from Google Storage. Going to load th
em.", len(newBinaryFuzzNames)) | 153 glog.Infof("%d newly found fuzzes from Google Storage. Going to load th
em.", len(newBinaryFuzzNames)) |
154 if len(newBinaryFuzzNames) > 0 { | 154 if len(newBinaryFuzzNames) > 0 { |
155 » » return f.gsLoader.LoadBinaryFuzzesFromGoogleStorage(newBinaryFuz
zNames) | 155 » » return f.gsLoader.LoadFuzzesFromGoogleStorage(newBinaryFuzzNames
) |
156 } | 156 } |
157 return nil | 157 return nil |
158 } | 158 } |
159 | 159 |
160 func (f *FuzzSyncer) LastCount(category string) FuzzCount { | 160 func (f *FuzzSyncer) LastCount(category string) FuzzCount { |
161 return f.lastCount[category] | 161 return f.lastCount[category] |
162 } | 162 } |
OLD | NEW |