Abyss-lord opened a new pull request, #7501:
URL: https://github.com/apache/gravitino/pull/7501

   ### What changes were proposed in this pull request?
   
   Add JMH Tests for EntityCache, the result as follows:
   
   ```text
   Benchmark                                                   (totalCnt)   
Mode  Cnt         Score         Error  Units
   EntityCacheClearBenchmark.benchmarkClear                            10  
thrpt   10    536704.823 ±   36351.106  ops/s
   EntityCacheClearBenchmark.benchmarkClear                           100  
thrpt   10     89391.338 ±    4692.738  ops/s
   EntityCacheClearBenchmark.benchmarkClear                          1000  
thrpt   10      8406.573 ±     738.173  ops/s
   EntityCacheContainsBenchmark.benchmarkContains                      10  
thrpt   10  19008727.286 ± 1172892.696  ops/s
   EntityCacheContainsBenchmark.benchmarkContains                     100  
thrpt   10  19129605.626 ±  928728.148  ops/s
   EntityCacheContainsBenchmark.benchmarkContains                    1000  
thrpt   10  17954917.808 ±  916939.288  ops/s
   EntityCacheContainsBenchmark.benchmarkContainsWithRelation          10  
thrpt   10   9454829.072 ±  403482.020  ops/s
   EntityCacheContainsBenchmark.benchmarkContainsWithRelation         100  
thrpt   10   5910924.166 ±  234228.471  ops/s
   EntityCacheContainsBenchmark.benchmarkContainsWithRelation        1000  
thrpt   10   1021172.939 ±  188152.980  ops/s
   EntityCacheGetBenchmark.benchmarkGet                                10  
thrpt   10  17646662.661 ± 1850512.796  ops/s
   EntityCacheGetBenchmark.benchmarkGet                               100  
thrpt   10  17906401.139 ±  905521.957  ops/s
   EntityCacheGetBenchmark.benchmarkGet                              1000  
thrpt   10  17882451.612 ± 1013749.411  ops/s
   EntityCacheGetBenchmark.benchmarkGetWithRelations                   10  
thrpt   10   7949607.041 ±  323537.818  ops/s
   EntityCacheGetBenchmark.benchmarkGetWithRelations                  100  
thrpt   10   4939219.694 ±   54283.320  ops/s
   EntityCacheGetBenchmark.benchmarkGetWithRelations                 1000  
thrpt   10   1060788.506 ±   22922.363  ops/s
   EntityCacheInvalidateBenchmark.benchmarkInvalidate                  10  
thrpt   10    184227.751 ±    6303.043  ops/s
   EntityCacheInvalidateBenchmark.benchmarkInvalidate                 100  
thrpt   10     19663.536 ±     684.142  ops/s
   EntityCacheInvalidateBenchmark.benchmarkInvalidate                1000  
thrpt   10      1651.429 ±     213.587  ops/s
   EntityCachePutBenchmark.benchmarkPut                                10  
thrpt   10    222207.294 ±   10992.713  ops/s
   EntityCachePutBenchmark.benchmarkPut                               100  
thrpt   10     20128.455 ±     434.551  ops/s
   EntityCachePutBenchmark.benchmarkPut                              1000  
thrpt   10      1902.510 ±      75.715  ops/s
   EntityCachePutBenchmark.benchmarkPutWithRelation                    10  
thrpt   10    335683.335 ±   34641.231  ops/s
   EntityCachePutBenchmark.benchmarkPutWithRelation                   100  
thrpt   10     26415.590 ±    1511.666  ops/s
   EntityCachePutBenchmark.benchmarkPutWithRelation                  1000  
thrpt   10      2345.904 ±      89.693  ops/s
   EntityCacheSizeBenchmark.entityCacheSize                            10  
thrpt   10   9416189.995 ± 1018247.698  ops/s
   EntityCacheSizeBenchmark.entityCacheSize                           100  
thrpt   10    944383.407 ±   35235.930  ops/s
   EntityCacheSizeBenchmark.entityCacheSize                          1000  
thrpt   10     79938.016 ±    2466.431  ops/s
   EntityCacheClearBenchmark.benchmarkClear                            10   
avgt   10        ≈ 10⁻⁵                 s/op
   EntityCacheClearBenchmark.benchmarkClear                           100   
avgt   10        ≈ 10⁻⁴                 s/op
   EntityCacheClearBenchmark.benchmarkClear                          1000   
avgt   10        ≈ 10⁻³                 s/op
   EntityCacheContainsBenchmark.benchmarkContains                      10   
avgt   10        ≈ 10⁻⁷                 s/op
   EntityCacheContainsBenchmark.benchmarkContains                     100   
avgt   10        ≈ 10⁻⁷                 s/op
   EntityCacheContainsBenchmark.benchmarkContains                    1000   
avgt   10        ≈ 10⁻⁷                 s/op
   EntityCacheContainsBenchmark.benchmarkContainsWithRelation          10   
avgt   10        ≈ 10⁻⁶                 s/op
   EntityCacheContainsBenchmark.benchmarkContainsWithRelation         100   
avgt   10        ≈ 10⁻⁶                 s/op
   EntityCacheContainsBenchmark.benchmarkContainsWithRelation        1000   
avgt   10        ≈ 10⁻⁵                 s/op
   EntityCacheGetBenchmark.benchmarkGet                                10   
avgt   10        ≈ 10⁻⁷                 s/op
   EntityCacheGetBenchmark.benchmarkGet                               100   
avgt   10        ≈ 10⁻⁷                 s/op
   EntityCacheGetBenchmark.benchmarkGet                              1000   
avgt   10        ≈ 10⁻⁷                 s/op
   EntityCacheGetBenchmark.benchmarkGetWithRelations                   10   
avgt   10        ≈ 10⁻⁶                 s/op
   EntityCacheGetBenchmark.benchmarkGetWithRelations                  100   
avgt   10        ≈ 10⁻⁶                 s/op
   EntityCacheGetBenchmark.benchmarkGetWithRelations                 1000   
avgt   10        ≈ 10⁻⁵                 s/op
   EntityCacheInvalidateBenchmark.benchmarkInvalidate                  10   
avgt   10        ≈ 10⁻⁵                 s/op
   EntityCacheInvalidateBenchmark.benchmarkInvalidate                 100   
avgt   10        ≈ 10⁻⁴                 s/op
   EntityCacheInvalidateBenchmark.benchmarkInvalidate                1000   
avgt   10         0.002 ±       0.001   s/op
   EntityCachePutBenchmark.benchmarkPut                                10   
avgt   10        ≈ 10⁻⁵                 s/op
   EntityCachePutBenchmark.benchmarkPut                               100   
avgt   10        ≈ 10⁻⁴                 s/op
   EntityCachePutBenchmark.benchmarkPut                              1000   
avgt   10         0.002 ±       0.001   s/op
   EntityCachePutBenchmark.benchmarkPutWithRelation                    10   
avgt   10        ≈ 10⁻⁵                 s/op
   EntityCachePutBenchmark.benchmarkPutWithRelation                   100   
avgt   10        ≈ 10⁻⁴                 s/op
   EntityCachePutBenchmark.benchmarkPutWithRelation                  1000   
avgt   10         0.002 ±       0.001   s/op
   EntityCacheSizeBenchmark.entityCacheSize                            10   
avgt   10        ≈ 10⁻⁶                 s/op
   EntityCacheSizeBenchmark.entityCacheSize                           100   
avgt   10        ≈ 10⁻⁵                 s/op
   EntityCacheSizeBenchmark.entityCacheSize                          1000   
avgt   10        ≈ 10⁻⁴                 s/op
   ```
   
   ### Why are the changes needed?
   
   Fix: #7472 
   
   ### Does this PR introduce _any_ user-facing change?
   
   no
   
   ### How was this patch tested?
   
   local test, `./gradlew :core:jmh`
   


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