-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Obtain JSR223 usage report after test execution #6510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
f719708
1c82baa
52282d8
c457940
07af912
163b6f8
907fe10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1985,6 +1985,10 @@ JMETER-SERVER</source> | |
| Used by JSR-223 elements.<br/> | ||
| Size of compiled scripts cache.<br/> | ||
| Defaults to: <code>100</code></property> | ||
| <property name="jsr223.compiled_scripts_cache_spec"> | ||
| Used by JSR-223 elements.<br/> | ||
| Caffeine framework spec configuration in String format. Overrides <code>jsr223.compiled_scripts_cache_size</code><br/> | ||
| Defaults to: <code>maximumSize=<jsr223.compiled_scripts_cache_size>,recordStats</code></property> | ||
|
||
| </properties> | ||
| </section> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add braces. We do use them, however, the check was missing: #6516
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure the stats are actionable. The stats do not seem to help users to identify the offending elements.
What are the units for "Compiled cache size"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
I've patched the code; the report only is the starting point of investigation, something which isn't available now? I'll come back in the following days with some sample JMX to help demo the outcome.
Indeed, doesn't point to exact "missing" JSR223 element, but still it's a starting point.
Disabling ${} is not necessary, maybe a warning is enough? Anyway, this matters only if the variable is stored in vars, if defined locally in the JSR223 then it works fine, i.e. is cached afaik.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 msThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Attaching sample JMX used for trials:
CCH-trials.zip
I've also updated the Caffeine library to v.3.1.8, latest 3.2.0 seems to bring incompatibilities or more changes because of dependencies.