binder_rpc_fuzzer: improve speed by reducing the no of connections
To limit the creation of socket connections,reduce the value
of kMaxConnections to 10. This will reduce the time it takes
for a socket to connect and disconnect for a large number of times.
exec/s : 68
Test: ./binder_rpc_fuzzer
Bug: 247837809
Change-Id: I23ea3e80f2c63152c00b2e7ec83d8ccb067bcf0b
diff --git a/libs/binder/tests/rpc_fuzzer/main.cpp b/libs/binder/tests/rpc_fuzzer/main.cpp
index b8ae84d..dcc8b8e 100644
--- a/libs/binder/tests/rpc_fuzzer/main.cpp
+++ b/libs/binder/tests/rpc_fuzzer/main.cpp
@@ -135,7 +135,7 @@
// b/260736889 - limit arbitrarily, due to thread resource exhaustion, which currently
// aborts. Servers should consider RpcServer::setConnectionFilter instead.
- constexpr size_t kMaxConnections = 1000;
+ constexpr size_t kMaxConnections = 10;
while (provider.remaining_bytes() > 0) {
if (connections.empty() ||