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.
Motivation:
Memory allocations are a useful tool when evaluating performance. As
such it's useful to have a framework where tests can run continually and
be checked against an expected limit.
Modifications:
There are three groups of related changes in this PR.
First, shuffling existing performance test code so that it may be used
with NIOs allocation counting test framework. This includes dropping the
dependency on the 'EchoModel' target and symlinking in the generated
protobuf and gRPC code services instead. Some of the benchmark code was
split into separate files as well (we'll symlink some code to the
allocation counting test). The 'Benchmark' protocol for the tests now
returns an 'Int' from the 'run' function (a requirement of the NIO
allocation counting test framework).
Second, the addition of various scripts to run allocation counting
tests. These were lifted from SwiftNIO and slightly modified to fit our
use case. As such a NOTICES.txt was also added. Three tests were also
added which make use of code from the existing performance tests. The
shared code is symlinked in (to avoid adding an additional library
product to the package).
Third, the Travis configuration was updated to run the tests on 5.2 and
5.3 on Linux only. A script was also added to parse the output from
running tests and produce an allocation limit.
Result:
We can track our allocation counts.