You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2016/08/11 21:37:36 UTC

[Bug 59991] New: New function __g to evaluate Groovy Script

https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

            Bug ID: 59991
           Summary: New function __g to evaluate Groovy Script
           Product: JMeter
           Version: 3.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: support@ubikloadpack.com

Hello,
Currently whenever you want to make some processing and a JMeter function is
not available for it, you can only use __BeanShell function.
For example:
- substring
- length
- Maths functions
- + hundreds of examples where you need the power of Java without wanting to
use a JSR223TestElement. 
....


Unfortunately Beanshell performances are horrid compared to Groovy ones for
example besides the fact that Groovy is now integrated in JMeter, maintained by
Apache and very popular and that Beanshell is nearly abandoned.


So we propose to add this function that will work the same way as Beanshell.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59991] New function __g to evaluate Groovy Script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

--- Comment #5 from Sebb <se...@apache.org> ---
This seems fine, but I think it's confusing to use the name '__g'.

The function should be called '__groovy' to align with the other scripting
functions.

Also the new file needs the standard AL header.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59991] New function __groovy to evaluate Groovy Script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|New function __g to         |New function __groovy to
                   |evaluate Groovy Script      |evaluate Groovy Script
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59991] New function __g to evaluate Groovy Script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

--- Comment #3 from UbikLoadPack support <su...@ubikloadpack.com> ---
On my machine with a default setup:

TG-Groovy Enabled only:
Generate Summary Results =  20000 in 00:00:00 = 41666.7/s Avg:     0 Min:     0
Max:     2 Err:     0 (0.00%)


TG-Beanshell enabled only:
Generate Summary Results +    891 in 00:00:01 = 1161.7/s Avg:     0 Min:     0
Max:     1 Err:     0 (0.00%) Active: 0 Started: 20 Finished: 20
Generate Summary Results =  40000 in 00:00:16 = 2539.4/s Avg:     0 Min:     0
Max:     2 Err:     0 (0.00%)


This simple benchmark shows that this new __g function is 35 times faster than
__BeanShell.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59991] New function __groovy to evaluate Groovy Script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Author: pmouawad
Date: Fri Aug 12 11:00:39 2016
New Revision: 1756144

URL: http://svn.apache.org/viewvc?rev=1756144&view=rev
Log:
Bug 59991 - New function __groovy to evaluate Groovy Script
Contributed by Ubik Load Pack
Bugzilla Id: 59991

Added:
    jmeter/trunk/src/functions/org/apache/jmeter/functions/Groovy.java   (with
props)
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
    jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties
    jmeter/trunk/xdocs/changes.xml
    jmeter/trunk/xdocs/usermanual/functions.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59991] New function __g to evaluate Groovy Script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

--- Comment #1 from UbikLoadPack support <su...@ubikloadpack.com> ---
Created attachment 34139
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34139&action=edit
Patch implementing this new feature

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59991] New function __g to evaluate Groovy Script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

--- Comment #4 from UbikLoadPack support <su...@ubikloadpack.com> ---
(In reply to UbikLoadPack support from comment #3)
> On my machine with a default setup:
> 
> TG-Groovy Enabled only:
> Generate Summary Results =  20000 in 00:00:00 = 41666.7/s Avg:     0 Min:   
> 0 Max:     2 Err:     0 (0.00%)
> 
> 
> TG-Beanshell enabled only:
> Generate Summary Results +    891 in 00:00:01 = 1161.7/s Avg:     0 Min:    
> 0 Max:     1 Err:     0 (0.00%) Active: 0 Started: 20 Finished: 20
> Generate Summary Results =  40000 in 00:00:16 = 2539.4/s Avg:     0 Min:    
> 0 Max:     2 Err:     0 (0.00%)
> 
> 
> This simple benchmark shows that this new __g function is 35 times faster
> than __BeanShell.

Sorry little mistake for Beanshell:

Generate Summary Results +  17444 in 00:00:13 = 1312.6/s Avg:     0 Min:     0
Max:     2 Err:     0 (0.00%) Active: 10 Started: 10 Finished: 0
Generate Summary Results +   2556 in 00:00:02 = 1296.1/s Avg:     0 Min:     0
Max:     1 Err:     0 (0.00%) Active: 0 Started: 10 Finished: 10
Generate Summary Results =  20000 in 00:00:15 = 1310.4/s Avg:     0 Min:     0
Max:     2 Err:     0 (0.00%)

This simple benchmark shows that this new __g function is 31 times faster
 than __BeanShell.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59991] New function __g to evaluate Groovy Script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59991

--- Comment #2 from UbikLoadPack support <su...@ubikloadpack.com> ---
Created attachment 34140
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=34140&action=edit
Test plan showing use case and allowing performane comparison

-- 
You are receiving this mail because:
You are the assignee for the bug.