Add sync test and refactor InParallel#2118
Merged
dgageot merged 3 commits intoGoogleContainerTools:masterfrom May 24, 2019
Merged
Add sync test and refactor InParallel#2118dgageot merged 3 commits intoGoogleContainerTools:masterfrom
dgageot merged 3 commits intoGoogleContainerTools:masterfrom
Conversation
balopat
reviewed
May 14, 2019
Codecov Report
@@ Coverage Diff @@
## master #2118 +/- ##
==========================================
+ Coverage 57.31% 57.59% +0.28%
==========================================
Files 186 187 +1
Lines 7871 7950 +79
==========================================
+ Hits 4511 4579 +68
- Misses 2948 2958 +10
- Partials 412 413 +1
Continue to review full report at Codecov.
|
dgageot
suggested changes
May 16, 2019
Now suddenly the opportunities to test have opened up! TODO: Add tests for individual refactored method.
On my branch, test number are: sequence.go -> 100% parallel.go -> 96.2%
dgageot
approved these changes
May 24, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some work from #2091
The Map type is optimized for two common use cases: (1) when the entry for a given key is only ever written once but read many times, as in caches that only grow, or (2) when multiple goroutines read, write, and overwrite entries for disjoint sets of keys. In these two cases, use of a Map may significantly reduce lock contention compared to a Go map paired with a separate Mutex or RWMutex.In our case, one go subroutine adds exactly one key and they are always disjoint.