diff --git a/CHANGELOG.md b/CHANGELOG.md index 39046eb..15a16f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.21.2] - 2026-02-20 + +### Changed +- Cap worker count to number of scenarios, avoiding unnecessary goroutines on small runs + ## [0.21.1] - 2026-02-13 ### Removed @@ -157,6 +162,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial release +[0.21.2]: https://github.com/gooddata/gooddata-neobackstop/compare/v0.21.1...v0.21.2 [0.21.1]: https://github.com/gooddata/gooddata-neobackstop/compare/v0.21.0...v0.21.1 [0.21.0]: https://github.com/gooddata/gooddata-neobackstop/compare/v0.20.2...v0.21.0 [0.20.2]: https://github.com/gooddata/gooddata-neobackstop/compare/v0.20.1...v0.20.2 diff --git a/VERSION b/VERSION index b9f8e55..2d62101 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.21.1 \ No newline at end of file +0.21.2 \ No newline at end of file diff --git a/main.go b/main.go index a086698..143ffb7 100644 --- a/main.go +++ b/main.go @@ -124,7 +124,7 @@ func main() { screenshotterResults := make(chan screenshotter.Result, numInternalScenarios) var wg1 sync.WaitGroup - for w := 1; w <= configuration.AsyncCaptureLimit; w++ { + for w := 1; w <= min(len(internalScenarios), configuration.AsyncCaptureLimit); w++ { wg1.Add(1) go screenshotter.Run(screenshotterSaveDir, pw, configuration, screenshotterJobs, &wg1, screenshotterResults, w, mode) } @@ -172,7 +172,7 @@ func main() { compareResults := make(chan comparer.Result, numSuccessfulCaptures) var wg2 sync.WaitGroup - for w := 1; w <= configuration.AsyncCompareLimit; w++ { + for w := 1; w <= min(numSuccessfulCaptures, configuration.AsyncCompareLimit); w++ { wg2.Add(1) go comparer.Run(configuration, compareJobs, &wg2, compareResults, w) }