Merged
Conversation
This should speed up compilation for tests that use only these mocks. Signed-off-by: Kyle Larose <kyle@agilicus.com>
More work to minimize the size of headers in UTs to hopefully speed them up. Signed-off-by: Kyle Larose <kyle@agilicus.com>
The network mocks header is quite large. I only need access to the connection mocks for my UT. So, split out the network mocks into their own header to decrease test compile times. Signed-off-by: Kyle Larose <kyle@agilicus.com>
Contributor
Author
lizan
reviewed
Dec 12, 2018
Member
lizan
left a comment
There was a problem hiding this comment.
Thanks for doing this! LGTM modulo small nits.
- Don't forward declare unless necessary - Use make_shared when allocated directly into a shared_ptr. Signed-off-by: Kyle Larose <kyle@agilicus.com>
lizan
approved these changes
Dec 12, 2018
zuercher
approved these changes
Dec 13, 2018
fredlas
pushed a commit
to fredlas/envoy
that referenced
this pull request
Mar 5, 2019
While developing the source transparency feature, I became frustrated with both the compile time of some of the tests, and the fact that changes in seemingly unrelated headers caused many tests to recompile. Much of this was caused by the monolithic mocks headers we use. Since they include everything for a high level component, any header depended upon by that component, which is likely many, being changed can cause a recompilation. Further, simply including that much slows down compilation. As an example, I found that splitting out the connection pool mocks decreased my unit test compile time from 13 seconds to 8 seconds. While not a drastic speedup, 5 seconds per compile is still quite a bit if you're doing TDD. You want feedback as quickly as possible! This PR was split out of envoyproxy#5255 with some minor changes to remove code that only applied in that PR. Risk Level: Low. This is just testing headers. Testing: Ran the tests multiple times. Docs Changes: N/A Release Notes: N/A Signed-off-by: Kyle Larose <kyle@agilicus.com> Signed-off-by: Fred Douglas <fredlas@google.com>
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.
Description: While developing the source transparency feature, I became frustrated with both the compile time of some of the tests, and the fact that changes in seemingly unrelated headers caused many tests to recompile. Much of this was caused by the monolithic mocks headers we use. Since they include everything for a high level component, any header depended upon by that component, which is likely many, being changed can cause a recompilation. Further, simply including that much slows down compilation.
As an example, I found that splitting out the connection pool mocks decreased my unit test compile time from 13 seconds to 8 seconds. While not a drastic speedup, 5 seconds per compile is still quite a bit if you're doing TDD. You want feedback as quickly as possible!
This PR was split out of #5255 with some minor changes to remove code that only applied in that PR.
Risk Level: Low. This is just testing headers.
Testing: Ran the tests multiple times.
Docs Changes: N/A
Release Notes: N/A