Add a basic concurrency test for the dataplane system tests (#832)

Add a basic concurrency test for the dataplane system tests. Also remove some spurious logging.
This commit is contained in:
Dario Domizioli
2018-03-10 00:51:02 +00:00
committed by GitHub
parent e4cf74d2a3
commit 9b28497cff
4 changed files with 50 additions and 7 deletions

View File

@@ -544,8 +544,6 @@ func creds(cert string, key string, ca string) (credentials.TransportCredentials
}), nil
}
const megabyte uint64 = 1024 * 1024
func createPureRunner(addr string, a Agent, creds credentials.TransportCredentials) (*pureRunner, error) {
var srv *grpc.Server
if creds != nil {
@@ -565,8 +563,10 @@ func createPureRunner(addr string, a Agent, creds credentials.TransportCredentia
return pr, nil
}
const megabyte uint64 = 1024 * 1024
func getAvailableMemoryUnits() uint64 {
// To reuse code - but it's a bit of a hack. TODO: refactor the OS-specific get memory funcs out of that.
throwawayRT := NewResourceTracker().(*resourceTracker)
return throwawayRT.ramAsyncTotal
return throwawayRT.ramAsyncTotal / megabyte
}