lhotari commented on PR #23930:
URL: https://github.com/apache/pulsar/pull/23930#issuecomment-2642482616

   I have also added a JMH benchmark for DefaultMonotonicSnapshotClock. Results 
on Apple Mac M3 Max:
   ```
   Benchmark                                                                    
  Mode  Cnt            Score             Error  Units
   DefaultMonotonicSnapshotClockBenchmark.getTickNanos001Threads                
 thrpt    3   2033254223.572 ±    41581820.145  ops/s
   DefaultMonotonicSnapshotClockBenchmark.getTickNanos010Threads                
 thrpt    3  18719597588.557 ±  2124798619.451  ops/s
   DefaultMonotonicSnapshotClockBenchmark.getTickNanos100Threads                
 thrpt    3  21049656355.267 ± 22701352214.776  ops/s
   DefaultMonotonicSnapshotClockBenchmark.getTickNanosRequestSnapshot001Threads 
 thrpt    3     70079972.669 ±     1667215.446  ops/s
   DefaultMonotonicSnapshotClockBenchmark.getTickNanosRequestSnapshot010Threads 
 thrpt    3     22865514.539 ±     1216715.428  ops/s
   DefaultMonotonicSnapshotClockBenchmark.getTickNanosRequestSnapshot100Threads 
 thrpt    3     16422340.515 ±     2346690.916  ops/s
   ```
   With the consistent mode (`requestSnapshot=true`), the throughput is about 
16.4 M ops/s with 100 threads so the implementation scales very well for it's 
purpose. The AsyncTokenBucket implementation has a solution to minimize the 
calls for a consistent view to up to 1 call for a snapshot interval so this 
will scale very well.
   
   
   


-- 
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]

Reply via email to