| OLD | NEW |
| 1 package config | 1 package config |
| 2 | 2 |
| 3 import ( | 3 import ( |
| 4 "sync" | 4 "sync" |
| 5 "time" | 5 "time" |
| 6 | 6 |
| 7 "go.skia.org/infra/go/vcsinfo" | 7 "go.skia.org/infra/go/vcsinfo" |
| 8 ) | 8 ) |
| 9 | 9 |
| 10 type generatorConfig struct { | 10 type generatorConfig struct { |
| 11 SkiaRoot string | 11 SkiaRoot string |
| 12 AflRoot string | 12 AflRoot string |
| 13 FuzzSamples string | 13 FuzzSamples string |
| 14 AflOutputPath string | 14 AflOutputPath string |
| 15 WorkingPath string | 15 WorkingPath string |
| 16 NumFuzzProcesses int | 16 NumFuzzProcesses int |
| 17 NumDownloadProcesses int | 17 NumDownloadProcesses int |
| 18 WatchAFL bool | 18 WatchAFL bool |
| 19 SkipGeneration bool |
| 19 VersionCheckPeriod time.Duration | 20 VersionCheckPeriod time.Duration |
| 20 SkiaVersion *vcsinfo.LongCommit | 21 SkiaVersion *vcsinfo.LongCommit |
| 21 versionMutex sync.Mutex | 22 versionMutex sync.Mutex |
| 22 } | 23 } |
| 23 | 24 |
| 24 type aggregatorConfig struct { | 25 type aggregatorConfig struct { |
| 25 FuzzPath string | 26 FuzzPath string |
| 26 ExecutablePath string | 27 ExecutablePath string |
| 27 NumAnalysisProcesses int | 28 NumAnalysisProcesses int |
| 28 NumUploadProcesses int | 29 NumUploadProcesses int |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 defer f.versionMutex.Unlock() | 70 defer f.versionMutex.Unlock() |
| 70 f.SkiaVersion = lc | 71 f.SkiaVersion = lc |
| 71 } | 72 } |
| 72 | 73 |
| 73 // SetSkiaVersion safely stores the LongCommit of the skia version that is being
used. | 74 // SetSkiaVersion safely stores the LongCommit of the skia version that is being
used. |
| 74 func (g *generatorConfig) SetSkiaVersion(lc *vcsinfo.LongCommit) { | 75 func (g *generatorConfig) SetSkiaVersion(lc *vcsinfo.LongCommit) { |
| 75 g.versionMutex.Lock() | 76 g.versionMutex.Lock() |
| 76 defer g.versionMutex.Unlock() | 77 defer g.versionMutex.Unlock() |
| 77 g.SkiaVersion = lc | 78 g.SkiaVersion = lc |
| 78 } | 79 } |
| OLD | NEW |