New FilterResults plugin

353 views
Skip to first unread message

Vincent Daburon

unread,
Sep 15, 2015, 11:53:48 AM9/15/15
to jmeter-plugins
Hi,

I create a new plugin to filter results.

This plugin is very similare to Merge Results UI but works this one file and no prefix.
http://jmeter-plugins.org/wiki/MergeResults/

With the UI we could export filter results in CSV or XML format.



This plugin also works this Reporter Tool like this example :
java  -jar %0\..\CMDRunner.jar --tool Reporter --plugin-type FilterResults --input-jtl test.csv --generate-csv filter.csv  --include-label-regex true --include-labels P1.* --start-offset 60 --end-offset 180

The out file is filter.csv only CSV format export.

Are you interested in this plugin?

Regards.
Vincent D.

Andrey Pokhilko

unread,
Sep 16, 2015, 7:38:58 AM9/16/15
to jmeter-plugins
Hi,

I don't understand what value does it bring. Why should I use it, what is the use case?

--
Andrey

вторник, 15 сентября 2015 г., 18:53:48 UTC+3 пользователь Vincent Daburon написал:

Vincent Daburon

unread,
Sep 16, 2015, 9:54:36 AM9/16/15
to jmeter-plugins
Hi,

I use JMeter + JMeter Plugins with Jenkins for Continue Integration.

1) I get JMeter scripts with SVN Update

2) I launch the JMeter Test with script command likes :
cd $JMETER_HOME/bin
./jmeter.sh  -JJM_DIR_RES=$WORKSPACE/resultat -JDURATION_SEC=$DURATION_SEC -n -t $WORKSPACE/script/test.jmx

3) I filtrer the result to keep only pages begin P[0-9], i don't want to show request to HTTP Simple Table Server or request from Thread Start Up group ou Tear Down group.
I record all url but i want to generate only "Transaction Controler" corresponding to a Page (like "Generate parent sample' chekbox)

I use a specific code, i want a JMeter Plugins code official
cd $JMETER_HOME/bin
./filter-result.sh --include-labels '[P][0-9]_.*' --include-label-regex true --input-file $WORKSPACE/$JM_DIR_RES/res.jtl --output-file $WORKSPACE/$JM_DIR_RES/res_filtred.jtl --save-as-xml true

4) generate les graphs with Listener Graph Generator (from Filtered result)
cd $JMETER_HOME/bin

./jmeter.sh -JJM_DIR_RES=$WORKSPACE/resultat -JIMAGE_WIDTH=$IMAGE_WIDTH -JIMAGE_HEIGHT=$IMAGE_HEIGHT -n -t $WORKSPACE/script/graph_generator.jmx

5) generate Perfmon Graph

6) Generate JMX Graph

7) Create a html file that contains all images generated (images from Graph Generator, Perfmon, JMX) with specific code

8) Use Publish HTML Site (jenkins plugins) contains html page generated and images

9) Use Publish Performance test result report (jenkins plugin) with Filtered Results

I use mainly the filtered result for the Jenkins Plugins "Publish Performance test result report" because i can filter "Raw result" with this plugin and also to accelerate the "Listener Graph Generator"

In attach file (Performance_Graphes_HTML.zip)  an example of the html page generated and images.


Regards.
Vincent D.
Performance_Graphes_HTML.zip

Vincent Daburon

unread,
Sep 16, 2015, 10:15:14 AM9/16/15
to jmeter-plugins
Hi,

I don't need a UI to filter results, just a shell will be enough.
Likes <JMETER_HOME>\bin\filter-results.cmd

rem   --success-filter <true/false>
rem   --include-labels <labels list>
rem   --exclude-labels <labels list>
rem   --include-label-regex <true/false>
rem   --exclude-label-regex <true/false>
rem   --start-offset <sec>
rem   --end-offset <sec>
rem   --input-file res.csv
rem   --output-file res_filtered.csv
rem   --save-as-xml <true/false>


setlocal

cd /D %~dp0

set CP=..\lib\ext\ApacheJMeter_core.jar;..\lib\ext\ApacheJMeter_components.jar;..\lib\ext\ApacheJMeter_http.jar;..\lib\ext\JMeterPlugins-Extras.jar
set CP=%CP%;..\lib\xmlpull-1.1.3.1.jar;..\lib\avalon-framework-4.1.4.jar;..\lib\xpp3_min-1.1.4c.jar;..\lib\jorphan.jar;..\lib\xstream-1.4.4.jar
set CP=%CP%;..\lib\logkit-2.0.jar;..\lib\commons-collections-3.2.1.jar;..\lib\oro-2.0.8.jar;..\lib\commons-lang3-3.1.jar

java -cp %CP% org.jmeterplugins.tools.FilterResults %*
====================================================
Regards.
Vincent D.

Andrey Pokhilko

unread,
Sep 17, 2015, 8:45:25 AM9/17/15
to jmeter-plugins
Yes, that what confused me, the UI needs...

You could have not a plugin, but a CMDWorker class that would implement what you want as a purely command line tool. 

I'd like to avoid the situation when JP@GC's cmdline tool is used to do anything except generating images and CSVs from result. Generating another JTL from original JTLs is definitely a different task and should be done with different cmdline tool. 

That tool can be of course the part of JP@GC distribution. By this, we can avoid "purpose confusion".

--
Andrey

среда, 16 сентября 2015 г., 17:15:14 UTC+3 пользователь Vincent Daburon написал:

Vincent Daburon

unread,
Sep 17, 2015, 11:58:12 AM9/17/15
to jmeter-plugins
Hi,

I think the command could be :
java  -jar %0\..\CMDRunner.jar --tool FilterResults  --include-labels '[P][0-9]_.*' --include-label-regex true --input-fileres.jtl --output-file res_filtred.jtl --save-as-xml true

Note the tool is "FilterResults" not the "Report"

Andrey do you agree with this call mode ?

Filter parameters are :
  --success-filter <true/false>
  --include-labels <labels list>
  --exclude-labels <labels list>
  --include-label-regex <true/false>
  --exclude-label-regex <true/false>
  --start-offset <sec>
  --end-offset <sec>
  --input-file res.csv
  --output-file res_filtered.csv
  --save-as-xml <true/false>

Regards.
Vincent D.

Andrey Pokhilko

unread,
Sep 18, 2015, 7:33:31 AM9/18/15
to jmeter-plugins
Yes, that's fine for me to have in Extras or ExtrasLibs set.

четверг, 17 сентября 2015 г., 18:58:12 UTC+3 пользователь Vincent Daburon написал:

somesh...@42gears.com

unread,
Feb 4, 2020, 2:42:15 AM2/4/20
to jmeter-plugins
Hi Vincent 
Could u please upload your command prompt screenshot it would be more helpful.

Vincent Daburon

unread,
Feb 4, 2020, 9:25:50 AM2/4/20
to jmeter-plugins

Mohammed Farhan Ejaz

unread,
Sep 23, 2021, 6:26:21 AM9/23/21
to jmeter-plugins
The tool is not able to preserve URL from the input jtl file
Reply all
Reply to author
Forward
0 new messages