maedhroz commented on a change in pull request #1045:
URL: https://github.com/apache/cassandra/pull/1045#discussion_r684547206
##########
File path: test/burn/org/apache/cassandra/transport/SimpleClientPerfTest.java
##########
@@ -190,7 +199,9 @@ public int encodedSize(QueryMessage queryMessage,
ProtocolVersion version)
AtomicBoolean measure = new AtomicBoolean(false);
DescriptiveStatistics stats = new DescriptiveStatistics();
Lock lock = new ReentrantLock();
-
+ RateLimiter limiter = RateLimiter.create(2000);
Review comment:
The Guava limiter actually enforces the rate internally by sleeping, so
it felt like the simplest thing to use for client tests like this, where we're
essentially seeing how closely we can maintain the desired limit in the face of
overload.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]