KingRabbid opened a new pull request, #6510:
URL: https://github.com/apache/jmeter/pull/6510

   JSR223 compiled script can be cached; size of cache can be configured. What 
lacks now is the view of actual cache usage after test run.
   
   ## Description
   Allow configuration of the Caffeine cache API in detail, as per supported 
parameters of the API; one of the parameters allow you to specify a cache usage 
report should be generated. This will be done at the end of the test run.
   Used cache size will always be printed.
   
   ## Motivation and Context
   One could configure the JSR223 cache usage but could not see how much of the 
cache is actually used, if sizing is appropriate as per JSR223 elements used in 
a JMX, if code can actually be cached, etc. This is especially useful in load 
and performance testing to reduce computing time on client side.
   
   Sample output when report is disabled (only used cache size is printed):
   
   `2025-10-06 14:32:13,887 INFO o.a.j.u.JSR223TestElement: Compiled cache 
size: 3, stats: CacheStats{hitCount=0, missCount=0, loadSuccessCount=0, 
loadFailureCount=0, totalLoadTime=0, evictionCount=0, evictionWeight=0}`
   
   Sample output when report is enabled (used cache size and details are 
printed):
   
   `2025-10-06 14:45:52,434 INFO o.a.j.u.JSR223TestElement: Compiled cache 
size: 3, stats: CacheStats{hitCount=2, missCount=3, loadSuccessCount=3, 
loadFailureCount=0, totalLoadTime=200523600, evictionCount=0, evictionWeight=0}
   `
   
   ## How Has This Been Tested?
   Simple runs of JSR223 script elements with checked or unchecked 'Cache 
compile script if available' and monitor the report; parameter left as the 
current pushed default in jmeter.properties or with _recordStats_ property 
removed.
   
   ## Screenshots (if appropriate):
   
   ## Types of changes
   - New feature (non-breaking change which adds functionality)
   
   ## Checklist:
   - [x] My code follows the [code style][style-guide] of this project.
   - [x] I have updated the documentation accordingly.
   
   [style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


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