jnorris
jnorris

Reputation: 6500

Graph a custom variable in JMeter

I have a simple "Java Request" sampler (ie: AbstractJavaSamplerClient). How do I produce custom variables from this sampler and graph these? (Preferably with out-of-the-box graphing listeners). Currently I can only easily graph sample times.

Upvotes: 3

Views: 1988

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34536

Put your var in JMeter:

JMeterContextService.getContext().getVariables().put("YOUR_VAR", value)

And add in user.properties:

sample_variables=YOUR_VAR

Your var will be output in CSV ou XML.

You can then use it.

Upvotes: 4

Related Questions