Reputation: 3
What is the best way to compare(manipulate) values from extracts in JSR223 Preprocessor without introducing performance degradation? JMeter is totally new tool for me.
I extracted values using two Regular Expression Extractors:
Extract1 has value1 and value2 (with Extract1_matchNr=20)
Extract2 has value3 and value2 (with Extract2_matchNr=80)
In JSR223 Preprocessor for same value2 I need to use pair combination of value1 and value3 from both extracts.
In Extract2 for each value2 there are about 4 unique values of value3 (I will randomly use just one value3 out of 4 values). In Extract1 both values of value1 and value2 are unique.
---Extract1:
Extract1_1_g1=101 (value1)
Extract1_1_g2=201 (value2)
Extract1_2_g1=102
Extract1_2_g2=202
....
Extract1_n_g1=YYY
Extract1_n_g2=ZZZ
---Extract2:
Extract2_1_g1=301 (value3)
Extract2_1_g2=201 (value2)
Extract2_2_g1=302
Extract2_2_g2=201 (same value2)
Extract2_3_g1=303
Extract2_3_g2=201 (same value2)
Extract2_4_g1=304
Extract2_4_g2=201 (same value2)
....
PS With one extract in other preProcessor I am using "for" loop to manipulate and concat values into myCombinedValues and use vars.put("pCombinedValues", myCombinedValues) for later use in other requests. all code samples I could find only use one extract.
Upvotes: 0
Views: 478
Reputation: 168072
Given you use:
${VAR}
inside Groovy scriptThere shouldn't be much overhead. See Beanshell vs JSR223 vs Java JMeter Scripting: The Performance-Off You've Been Waiting For! guide for more detailed information and scripting best practices.
Upvotes: 0