You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Lorenzo Fundaró <lo...@gmail.com> on 2014/12/22 17:20:06 UTC

about samplers/{pre,post}-processors in Scala

Hello guys,

I would like to know if we have a plan to introduce a
sampler/{pre,post}-processor using Scala Language.
Would this make sense ? If so, I would be really interested on implementing
it.

Cheers  !

Lorenzo Fundaró García

Re: about samplers/{pre,post}-processors in Scala

Posted by UBIK LOAD PACK Support <su...@ubikloadpack.com>.
Hi,
Steps:
1/ Add scala libraries and jar that contains scala JSR223 engine to
jmeter/lib and restart jmeter
2/ Add a JSR223 Sampler
3/ In this sampler, select as language scala , if it does not appear check
step 1
4/ Add you scala code in the script part, knowing that jmeter would have
exposed the variables that are shown, see
http://jmeter.apache.org/usermanual/component_reference.html#BSF_Sampler
for code example regarding those variables


Regards
@ubikloadpack

On Tue, Dec 23, 2014 at 10:17 AM, Lorenzo Fundaró <lo...@gmail.com>
wrote:

> Ok,
>
> I will have to investigate a bit about the current state of Scala
> implementation of JSR223 interface. AFAIK it's already implemented since
> Scala 2.11. I will give it a try, although it's still not very clear how I
> would do this with Jmeter, I think I am missing some core concepts here
> with JSR233.
> I will really appreciate it If you can give me some lights of where I
> should focus my research.
>
> Thank you.
>
>
> Lorenzo Fundaró García
>
> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
> support@ubikloadpack.com> wrote:
>>
>> Hello,
>> This is already possible through JSR223 Family.
>> But last time we tried it, as JSR223 Engine didn't seem to support
>> Compilation (as Groovy does) performance were just awful making it
>> unusable.
>>
>> Maybe this has changed , tests are welcome.
>> I compilation is still not supported, maybe you could open a feature
>> request on the scala project.
>>
>>
>> Regards
>> @ubikloadpack
>>
>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró <
>> lorenzofundaro@gmail.com>
>> wrote:
>>
>> > Hello guys,
>> >
>> > I would like to know if we have a plan to introduce a
>> > sampler/{pre,post}-processor using Scala Language.
>> > Would this make sense ? If so, I would be really interested on
>> implementing
>> > it.
>> >
>> > Cheers  !
>> >
>> > Lorenzo Fundaró García
>> >
>>
>


-- 

Regards
Ubik Load Pack <http://ubikloadpack.com> Team
Follow us on Twitter <http://twitter.com/ubikloadpack>


Cordialement
L'équipe Ubik Load Pack <http://ubikloadpack.com>
Suivez-nous sur Twitter <http://twitter.com/ubikloadpack>

Re: about samplers/{pre,post}-processors in Scala

Posted by Philippe Mouawad <ph...@gmail.com>.
And what about the performances, did you notice good ones ?

Worth reporting to scala project no?

On Tuesday, December 23, 2014, sebb <se...@gmail.com> wrote:

> On 23 December 2014 at 13:59, Felix Schumacher
> <felix.schumacher@internetallee.de <javascript:;>> wrote:
> > Am 23.12.2014 um 13:28 schrieb sebb:
> >
> >> On 23 December 2014 at 12:07, Felix Schumacher
> >> <felix.schumacher@internetallee.de <javascript:;>> wrote:
> >>>
> >>> Am 23.12.2014 um 10:57 schrieb sebb:
> >>>>
> >>>> On 23 December 2014 at 09:17, Lorenzo Fundaró <
> lorenzofundaro@gmail.com <javascript:;>>
> >>>> wrote:
> >>>>>
> >>>>> Ok,
> >>>>>
> >>>>> I will have to investigate a bit about the current state of Scala
> >>>>> implementation of JSR223 interface. AFAIK it's already implemented
> >>>>> since
> >>>>> Scala 2.11.
> >>>>
> >>>> To support JSR223 scripting means Scala must provide a class that
> >>>> implements the interface javax.script.ScriptEngine.
> >>>>
> >>>> To support compilation as well as run-time interpretation, the class
> >>>> must also implement the interface javax.script.Compilable.
> >>>
> >>> I have tested a simple ScriptEngine with scala 2.11.4 and it appears to
> >>> implement Compilable.
> >>>
> >>>   ScriptEngine scalaEngine = new
> >>> ScriptEngineManager().getEngineByName("scala");
> >>>   if (scalaEngine instanceof Compilable) {
> >>>         System.out.println("OK");
> >>>   }
> >>>
> >>> prints out "OK".
> >>
> >> Thanks!
> >>
> >> So long as the Compilable.compile(Reader script) method actually works
> >> (*), this should allow scripts to be processed much more efficiently.
> >>
> >> (*) BeanShell implements compilable but throws Error: unimplemented -
> >> which is very unhelpful!
> >
> > I tried to go a bit further. To compile stuff, I had to set the jvm
> > parameter -Dscala.usejavacp=true. With that the code
> >
> >  ScriptEngine scalaEngine = new
> > ScriptEngineManager().getEngineByName("scala");
> >  Bindings bindings = scalaEngine.getBindings(ScriptContext.ENGINE_SCOPE);
> >  bindings.put("n", 23);
> >  if (scalaEngine instanceof Compilable) {
> >    Compilable compilableEngine = (Compilable) scalaEngine;
> >    CompiledScript compiledScript =
> > compilableEngine.compile("n.asInstanceOf[Int]");
> >    ScriptContext context = scalaEngine.getContext();
> >    System.out.println(compiledScript.eval(context));
> >    bindings.put("n", 42);
> >    System.out.println(compiledScript.eval(context));
> >   }
> >
> > runs, but will print "23" two times instead of 23 and 42. So it seems the
> > context is not re-evaluated correctly.
>
> I tried the interpreted versions:
>
>
> System.out.println(scalaEngine.eval("n.asInstanceOf[Int]",bindings));
>
> System.out.println(scalaEngine.eval("n.asInstanceOf[Int]",context));
>
> and these both worked OK.
>
> So it does look like the context is being baked into the compiled code
> somehow.
> Unfortunately that means compiled scripts are severely limited.
>
> > Regards
> >  Felix
> >
> >
> >>
> >>>>
> >>>>> I will give it a try, although it's still not very clear how I
> >>>>> would do this with Jmeter, I think I am missing some core concepts
> here
> >>>>> with JSR233.
> >>>>> I will really appreciate it If you can give me some lights of where I
> >>>>> should focus my research.
> >>>>>
> >>>>> Thank you.
> >>>>>
> >>>>>
> >>>>> Lorenzo Fundaró García
> >>>>>
> >>>>> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
> >>>>> support@ubikloadpack.com <javascript:;>> wrote:
> >>>>>>
> >>>>>> Hello,
> >>>>>> This is already possible through JSR223 Family.
> >>>>>> But last time we tried it, as JSR223 Engine didn't seem to support
> >>>>>> Compilation (as Groovy does) performance were just awful making it
> >>>>>> unusable.
> >>>>>>
> >>>>>> Maybe this has changed , tests are welcome.
> >>>>>> I compilation is still not supported, maybe you could open a feature
> >>>>>> request on the scala project.
> >>>>>>
> >>>>>>
> >>>>>> Regards
> >>>>>> @ubikloadpack
> >>>>>>
> >>>>>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró
> >>>>>> <lorenzofundaro@gmail.com <javascript:;>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hello guys,
> >>>>>>>
> >>>>>>> I would like to know if we have a plan to introduce a
> >>>>>>> sampler/{pre,post}-processor using Scala Language.
> >>>>>>> Would this make sense ? If so, I would be really interested on
> >>>>>>
> >>>>>> implementing
> >>>>>>>
> >>>>>>> it.
> >>>>>>>
> >>>>>>> Cheers  !
> >>>>>>>
> >>>>>>> Lorenzo Fundaró García
> >>>>>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> <javascript:;>
> >>>> For additional commands, e-mail: user-help@jmeter.apache.org
> <javascript:;>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> <javascript:;>
> >>> For additional commands, e-mail: user-help@jmeter.apache.org
> <javascript:;>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> <javascript:;>
> >> For additional commands, e-mail: user-help@jmeter.apache.org
> <javascript:;>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> <javascript:;>
> > For additional commands, e-mail: user-help@jmeter.apache.org
> <javascript:;>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org <javascript:;>
> For additional commands, e-mail: user-help@jmeter.apache.org
> <javascript:;>
>
>

-- 
Cordialement.
Philippe Mouawad.

Re: about samplers/{pre,post}-processors in Scala

Posted by sebb <se...@gmail.com>.
On 23 December 2014 at 13:59, Felix Schumacher
<fe...@internetallee.de> wrote:
> Am 23.12.2014 um 13:28 schrieb sebb:
>
>> On 23 December 2014 at 12:07, Felix Schumacher
>> <fe...@internetallee.de> wrote:
>>>
>>> Am 23.12.2014 um 10:57 schrieb sebb:
>>>>
>>>> On 23 December 2014 at 09:17, Lorenzo Fundaró <lo...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Ok,
>>>>>
>>>>> I will have to investigate a bit about the current state of Scala
>>>>> implementation of JSR223 interface. AFAIK it's already implemented
>>>>> since
>>>>> Scala 2.11.
>>>>
>>>> To support JSR223 scripting means Scala must provide a class that
>>>> implements the interface javax.script.ScriptEngine.
>>>>
>>>> To support compilation as well as run-time interpretation, the class
>>>> must also implement the interface javax.script.Compilable.
>>>
>>> I have tested a simple ScriptEngine with scala 2.11.4 and it appears to
>>> implement Compilable.
>>>
>>>   ScriptEngine scalaEngine = new
>>> ScriptEngineManager().getEngineByName("scala");
>>>   if (scalaEngine instanceof Compilable) {
>>>         System.out.println("OK");
>>>   }
>>>
>>> prints out "OK".
>>
>> Thanks!
>>
>> So long as the Compilable.compile(Reader script) method actually works
>> (*), this should allow scripts to be processed much more efficiently.
>>
>> (*) BeanShell implements compilable but throws Error: unimplemented -
>> which is very unhelpful!
>
> I tried to go a bit further. To compile stuff, I had to set the jvm
> parameter -Dscala.usejavacp=true. With that the code
>
>  ScriptEngine scalaEngine = new
> ScriptEngineManager().getEngineByName("scala");
>  Bindings bindings = scalaEngine.getBindings(ScriptContext.ENGINE_SCOPE);
>  bindings.put("n", 23);
>  if (scalaEngine instanceof Compilable) {
>    Compilable compilableEngine = (Compilable) scalaEngine;
>    CompiledScript compiledScript =
> compilableEngine.compile("n.asInstanceOf[Int]");
>    ScriptContext context = scalaEngine.getContext();
>    System.out.println(compiledScript.eval(context));
>    bindings.put("n", 42);
>    System.out.println(compiledScript.eval(context));
>   }
>
> runs, but will print "23" two times instead of 23 and 42. So it seems the
> context is not re-evaluated correctly.

I tried the interpreted versions:

        System.out.println(scalaEngine.eval("n.asInstanceOf[Int]",bindings));
        System.out.println(scalaEngine.eval("n.asInstanceOf[Int]",context));

and these both worked OK.

So it does look like the context is being baked into the compiled code somehow.
Unfortunately that means compiled scripts are severely limited.

> Regards
>  Felix
>
>
>>
>>>>
>>>>> I will give it a try, although it's still not very clear how I
>>>>> would do this with Jmeter, I think I am missing some core concepts here
>>>>> with JSR233.
>>>>> I will really appreciate it If you can give me some lights of where I
>>>>> should focus my research.
>>>>>
>>>>> Thank you.
>>>>>
>>>>>
>>>>> Lorenzo Fundaró García
>>>>>
>>>>> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
>>>>> support@ubikloadpack.com> wrote:
>>>>>>
>>>>>> Hello,
>>>>>> This is already possible through JSR223 Family.
>>>>>> But last time we tried it, as JSR223 Engine didn't seem to support
>>>>>> Compilation (as Groovy does) performance were just awful making it
>>>>>> unusable.
>>>>>>
>>>>>> Maybe this has changed , tests are welcome.
>>>>>> I compilation is still not supported, maybe you could open a feature
>>>>>> request on the scala project.
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>> @ubikloadpack
>>>>>>
>>>>>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró
>>>>>> <lorenzofundaro@gmail.com
>>>>>> wrote:
>>>>>>
>>>>>>> Hello guys,
>>>>>>>
>>>>>>> I would like to know if we have a plan to introduce a
>>>>>>> sampler/{pre,post}-processor using Scala Language.
>>>>>>> Would this make sense ? If so, I would be really interested on
>>>>>>
>>>>>> implementing
>>>>>>>
>>>>>>> it.
>>>>>>>
>>>>>>> Cheers  !
>>>>>>>
>>>>>>> Lorenzo Fundaró García
>>>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: about samplers/{pre,post}-processors in Scala

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 23.12.2014 um 13:28 schrieb sebb:
> On 23 December 2014 at 12:07, Felix Schumacher
> <fe...@internetallee.de> wrote:
>> Am 23.12.2014 um 10:57 schrieb sebb:
>>> On 23 December 2014 at 09:17, Lorenzo Fundaró <lo...@gmail.com>
>>> wrote:
>>>> Ok,
>>>>
>>>> I will have to investigate a bit about the current state of Scala
>>>> implementation of JSR223 interface. AFAIK it's already implemented since
>>>> Scala 2.11.
>>> To support JSR223 scripting means Scala must provide a class that
>>> implements the interface javax.script.ScriptEngine.
>>>
>>> To support compilation as well as run-time interpretation, the class
>>> must also implement the interface javax.script.Compilable.
>> I have tested a simple ScriptEngine with scala 2.11.4 and it appears to
>> implement Compilable.
>>
>>   ScriptEngine scalaEngine = new
>> ScriptEngineManager().getEngineByName("scala");
>>   if (scalaEngine instanceof Compilable) {
>>         System.out.println("OK");
>>   }
>>
>> prints out "OK".
> Thanks!
>
> So long as the Compilable.compile(Reader script) method actually works
> (*), this should allow scripts to be processed much more efficiently.
>
> (*) BeanShell implements compilable but throws Error: unimplemented -
> which is very unhelpful!
I tried to go a bit further. To compile stuff, I had to set the jvm 
parameter -Dscala.usejavacp=true. With that the code

  ScriptEngine scalaEngine = new 
ScriptEngineManager().getEngineByName("scala");
  Bindings bindings = scalaEngine.getBindings(ScriptContext.ENGINE_SCOPE);
  bindings.put("n", 23);
  if (scalaEngine instanceof Compilable) {
    Compilable compilableEngine = (Compilable) scalaEngine;
    CompiledScript compiledScript = 
compilableEngine.compile("n.asInstanceOf[Int]");
    ScriptContext context = scalaEngine.getContext();
    System.out.println(compiledScript.eval(context));
    bindings.put("n", 42);
    System.out.println(compiledScript.eval(context));
   }

runs, but will print "23" two times instead of 23 and 42. So it seems 
the context is not re-evaluated correctly.

Regards
  Felix

>
>>>
>>>> I will give it a try, although it's still not very clear how I
>>>> would do this with Jmeter, I think I am missing some core concepts here
>>>> with JSR233.
>>>> I will really appreciate it If you can give me some lights of where I
>>>> should focus my research.
>>>>
>>>> Thank you.
>>>>
>>>>
>>>> Lorenzo Fundaró García
>>>>
>>>> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
>>>> support@ubikloadpack.com> wrote:
>>>>> Hello,
>>>>> This is already possible through JSR223 Family.
>>>>> But last time we tried it, as JSR223 Engine didn't seem to support
>>>>> Compilation (as Groovy does) performance were just awful making it
>>>>> unusable.
>>>>>
>>>>> Maybe this has changed , tests are welcome.
>>>>> I compilation is still not supported, maybe you could open a feature
>>>>> request on the scala project.
>>>>>
>>>>>
>>>>> Regards
>>>>> @ubikloadpack
>>>>>
>>>>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró
>>>>> <lorenzofundaro@gmail.com
>>>>> wrote:
>>>>>
>>>>>> Hello guys,
>>>>>>
>>>>>> I would like to know if we have a plan to introduce a
>>>>>> sampler/{pre,post}-processor using Scala Language.
>>>>>> Would this make sense ? If so, I would be really interested on
>>>>> implementing
>>>>>> it.
>>>>>>
>>>>>> Cheers  !
>>>>>>
>>>>>> Lorenzo Fundaró García
>>>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>>> For additional commands, e-mail: user-help@jmeter.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: about samplers/{pre,post}-processors in Scala

Posted by sebb <se...@gmail.com>.
On 23 December 2014 at 12:07, Felix Schumacher
<fe...@internetallee.de> wrote:
> Am 23.12.2014 um 10:57 schrieb sebb:
>>
>> On 23 December 2014 at 09:17, Lorenzo Fundaró <lo...@gmail.com>
>> wrote:
>>>
>>> Ok,
>>>
>>> I will have to investigate a bit about the current state of Scala
>>> implementation of JSR223 interface. AFAIK it's already implemented since
>>> Scala 2.11.
>>
>> To support JSR223 scripting means Scala must provide a class that
>> implements the interface javax.script.ScriptEngine.
>>
>> To support compilation as well as run-time interpretation, the class
>> must also implement the interface javax.script.Compilable.
>
> I have tested a simple ScriptEngine with scala 2.11.4 and it appears to
> implement Compilable.
>
>  ScriptEngine scalaEngine = new
> ScriptEngineManager().getEngineByName("scala");
>  if (scalaEngine instanceof Compilable) {
>        System.out.println("OK");
>  }
>
> prints out "OK".

Thanks!

So long as the Compilable.compile(Reader script) method actually works
(*), this should allow scripts to be processed much more efficiently.

(*) BeanShell implements compilable but throws Error: unimplemented -
which is very unhelpful!

>>
>>
>>> I will give it a try, although it's still not very clear how I
>>> would do this with Jmeter, I think I am missing some core concepts here
>>> with JSR233.
>>> I will really appreciate it If you can give me some lights of where I
>>> should focus my research.
>>>
>>> Thank you.
>>>
>>>
>>> Lorenzo Fundaró García
>>>
>>> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
>>> support@ubikloadpack.com> wrote:
>>>>
>>>> Hello,
>>>> This is already possible through JSR223 Family.
>>>> But last time we tried it, as JSR223 Engine didn't seem to support
>>>> Compilation (as Groovy does) performance were just awful making it
>>>> unusable.
>>>>
>>>> Maybe this has changed , tests are welcome.
>>>> I compilation is still not supported, maybe you could open a feature
>>>> request on the scala project.
>>>>
>>>>
>>>> Regards
>>>> @ubikloadpack
>>>>
>>>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró
>>>> <lorenzofundaro@gmail.com
>>>> wrote:
>>>>
>>>>> Hello guys,
>>>>>
>>>>> I would like to know if we have a plan to introduce a
>>>>> sampler/{pre,post}-processor using Scala Language.
>>>>> Would this make sense ? If so, I would be really interested on
>>>>
>>>> implementing
>>>>>
>>>>> it.
>>>>>
>>>>> Cheers  !
>>>>>
>>>>> Lorenzo Fundaró García
>>>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
>> For additional commands, e-mail: user-help@jmeter.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: about samplers/{pre,post}-processors in Scala

Posted by Felix Schumacher <fe...@internetallee.de>.
Am 23.12.2014 um 10:57 schrieb sebb:
> On 23 December 2014 at 09:17, Lorenzo Fundaró <lo...@gmail.com> wrote:
>> Ok,
>>
>> I will have to investigate a bit about the current state of Scala
>> implementation of JSR223 interface. AFAIK it's already implemented since
>> Scala 2.11.
> To support JSR223 scripting means Scala must provide a class that
> implements the interface javax.script.ScriptEngine.
>
> To support compilation as well as run-time interpretation, the class
> must also implement the interface javax.script.Compilable.
I have tested a simple ScriptEngine with scala 2.11.4 and it appears to 
implement Compilable.

  ScriptEngine scalaEngine = new 
ScriptEngineManager().getEngineByName("scala");
  if (scalaEngine instanceof Compilable) {
        System.out.println("OK");
  }

prints out "OK".
>
>> I will give it a try, although it's still not very clear how I
>> would do this with Jmeter, I think I am missing some core concepts here
>> with JSR233.
>> I will really appreciate it If you can give me some lights of where I
>> should focus my research.
>>
>> Thank you.
>>
>>
>> Lorenzo Fundaró García
>>
>> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
>> support@ubikloadpack.com> wrote:
>>> Hello,
>>> This is already possible through JSR223 Family.
>>> But last time we tried it, as JSR223 Engine didn't seem to support
>>> Compilation (as Groovy does) performance were just awful making it
>>> unusable.
>>>
>>> Maybe this has changed , tests are welcome.
>>> I compilation is still not supported, maybe you could open a feature
>>> request on the scala project.
>>>
>>>
>>> Regards
>>> @ubikloadpack
>>>
>>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró <lorenzofundaro@gmail.com
>>> wrote:
>>>
>>>> Hello guys,
>>>>
>>>> I would like to know if we have a plan to introduce a
>>>> sampler/{pre,post}-processor using Scala Language.
>>>> Would this make sense ? If so, I would be really interested on
>>> implementing
>>>> it.
>>>>
>>>> Cheers  !
>>>>
>>>> Lorenzo Fundaró García
>>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: about samplers/{pre,post}-processors in Scala

Posted by sebb <se...@gmail.com>.
On 23 December 2014 at 09:17, Lorenzo Fundaró <lo...@gmail.com> wrote:
> Ok,
>
> I will have to investigate a bit about the current state of Scala
> implementation of JSR223 interface. AFAIK it's already implemented since
> Scala 2.11.

To support JSR223 scripting means Scala must provide a class that
implements the interface javax.script.ScriptEngine.

To support compilation as well as run-time interpretation, the class
must also implement the interface javax.script.Compilable.

> I will give it a try, although it's still not very clear how I
> would do this with Jmeter, I think I am missing some core concepts here
> with JSR233.
> I will really appreciate it If you can give me some lights of where I
> should focus my research.
>
> Thank you.
>
>
> Lorenzo Fundaró García
>
> On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
> support@ubikloadpack.com> wrote:
>>
>> Hello,
>> This is already possible through JSR223 Family.
>> But last time we tried it, as JSR223 Engine didn't seem to support
>> Compilation (as Groovy does) performance were just awful making it
>> unusable.
>>
>> Maybe this has changed , tests are welcome.
>> I compilation is still not supported, maybe you could open a feature
>> request on the scala project.
>>
>>
>> Regards
>> @ubikloadpack
>>
>> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró <lorenzofundaro@gmail.com
>> >
>> wrote:
>>
>> > Hello guys,
>> >
>> > I would like to know if we have a plan to introduce a
>> > sampler/{pre,post}-processor using Scala Language.
>> > Would this make sense ? If so, I would be really interested on
>> implementing
>> > it.
>> >
>> > Cheers  !
>> >
>> > Lorenzo Fundaró García
>> >
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: about samplers/{pre,post}-processors in Scala

Posted by Lorenzo Fundaró <lo...@gmail.com>.
Ok,

I will have to investigate a bit about the current state of Scala
implementation of JSR223 interface. AFAIK it's already implemented since
Scala 2.11. I will give it a try, although it's still not very clear how I
would do this with Jmeter, I think I am missing some core concepts here
with JSR233.
I will really appreciate it If you can give me some lights of where I
should focus my research.

Thank you.


Lorenzo Fundaró García

On Mon, Dec 22, 2014 at 5:25 PM, UBIK LOAD PACK Support <
support@ubikloadpack.com> wrote:
>
> Hello,
> This is already possible through JSR223 Family.
> But last time we tried it, as JSR223 Engine didn't seem to support
> Compilation (as Groovy does) performance were just awful making it
> unusable.
>
> Maybe this has changed , tests are welcome.
> I compilation is still not supported, maybe you could open a feature
> request on the scala project.
>
>
> Regards
> @ubikloadpack
>
> On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró <lorenzofundaro@gmail.com
> >
> wrote:
>
> > Hello guys,
> >
> > I would like to know if we have a plan to introduce a
> > sampler/{pre,post}-processor using Scala Language.
> > Would this make sense ? If so, I would be really interested on
> implementing
> > it.
> >
> > Cheers  !
> >
> > Lorenzo Fundaró García
> >
>

Re: about samplers/{pre,post}-processors in Scala

Posted by UBIK LOAD PACK Support <su...@ubikloadpack.com>.
Hello,
This is already possible through JSR223 Family.
But last time we tried it, as JSR223 Engine didn't seem to support
Compilation (as Groovy does) performance were just awful making it unusable.

Maybe this has changed , tests are welcome.
I compilation is still not supported, maybe you could open a feature
request on the scala project.


Regards
@ubikloadpack

On Mon, Dec 22, 2014 at 5:20 PM, Lorenzo Fundaró <lo...@gmail.com>
wrote:

> Hello guys,
>
> I would like to know if we have a plan to introduce a
> sampler/{pre,post}-processor using Scala Language.
> Would this make sense ? If so, I would be really interested on implementing
> it.
>
> Cheers  !
>
> Lorenzo Fundaró García
>