KingRabbid commented on code in PR #6510:
URL: https://github.com/apache/jmeter/pull/6510#discussion_r2453415749


##########
src/core/src/main/java/org/apache/jmeter/util/JSR223TestElement.java:
##########
@@ -357,6 +355,8 @@ public void testEnded() {
      */
     @Override
     public void testEnded(String host) {
+        if (COMPILED_SCRIPT_CACHE.estimatedSize() > 0)
+            logger.info("Compiled cache size: {}, stats: {}", 
COMPILED_SCRIPT_CACHE.estimatedSize(), COMPILED_SCRIPT_CACHE.stats());

Review Comment:
   I've pushed more changes; now I've implemented the logic to print, at debug 
level, JSR223 elements that don't get into cache: unchecked flag, compile 
problem.
   Also, I've extended the output of the stats to include all relevant KPIs 
currently available in the API:
   `
   2025-10-23 00:40:00,693 INFO o.a.j.u.JSR223TestElement: JSR223 cached 
scripts: 2, requestsCount: 13 (hitCount: 4 + missedCount: 9), (hitRate: 0.31, 
missRate: 0.69), loadCount: 9 (loadSuccessCount: 2 + loadFailureCount: 7), 
evictionCount: 0, evictionWeight: 0, totalLoadTime: 1471.00 ms, 
averageLoadPenalty: 163.44 ms
   `



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