ppkarwasz commented on PR #748:
URL: https://github.com/apache/commons-io/pull/748#issuecomment-2888400945

   I ran a small benchmark (also included in 
35d1ce4893a979745f98372fd3bb7fed85679093) that measures the time it takes to 
read 1 MiB from the queue, while another thread is writing to it. The results 
look promising.
   
   ### Before
   
   | Benchmark                                  | Mode   | Cnt | Score   | 
Error   | Units |
   
|--------------------------------------------|--------|-----|---------|---------|-------|
   | QueueStreamBenchmark.streams:input         | sample | 639 | 78.261  | ± 
1.892 | ms/op |
   | QueueStreamBenchmark.streams:input:p0.00   | sample |     | 60.293  |      
   | ms/op |
   | QueueStreamBenchmark.streams:input:p0.50   | sample |     | 69.861  |      
   | ms/op |
   | QueueStreamBenchmark.streams:input:p0.90   | sample |     | 96.600  |      
   | ms/op |
   | QueueStreamBenchmark.streams:input:p0.95   | sample |     | 104.858 |      
   | ms/op |
   | QueueStreamBenchmark.streams:input:p0.99   | sample |     | 123.627 |      
   | ms/op |
   | QueueStreamBenchmark.streams:input:p0.999  | sample |     | 156.500 |      
   | ms/op |
   | QueueStreamBenchmark.streams:input:p0.9999 | sample |     | 156.500 |      
   | ms/op |
   | QueueStreamBenchmark.streams:input:p1.00   | sample |     | 156.500 |      
   | ms/op |
   
   ### After
   
   **Note**: The high values in some benchmark runs are due to a 
synchronization problem between the two threads, which led the 
`QueueInputStream` thread to time out.
   
   | Benchmark                                  | Mode   | Cnt  | Score    | 
Error   | Units |
   
|--------------------------------------------|--------|------|----------|---------|-------|
   | QueueStreamBenchmark.streams:input         | sample | 9577 | 21.248   | ± 
5.848 | ms/op |
   | QueueStreamBenchmark.streams:input:p0.00   | sample |      | 3.650    |    
     | ms/op |
   | QueueStreamBenchmark.streams:input:p0.50   | sample |      | 12.222   |    
     | ms/op |
   | QueueStreamBenchmark.streams:input:p0.90   | sample |      | 12.386   |    
     | ms/op |
   | QueueStreamBenchmark.streams:input:p0.95   | sample |      | 12.468   |    
     | ms/op |
   | QueueStreamBenchmark.streams:input:p0.99   | sample |      | 33.787   |    
     | ms/op |
   | QueueStreamBenchmark.streams:input:p0.999  | sample |      | 2292.976 |    
     | ms/op |
   | QueueStreamBenchmark.streams:input:p0.9999 | sample |      | 8128.561 |    
     | ms/op |
   | QueueStreamBenchmark.streams:input:p1.00   | sample |      | 8128.561 |    
     | ms/op |


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