JMeter - Graphite Backend listener rootmetricsPrefix taking previously generated value

Background : I am using graphite to store data generated during a performance test, and ideally we would like to have a look at historical charts as well. Hence, I create the name of the rootMetricsPrefix folder dynamically in the installation threadgroup and assign it to the property. The listener backend is in a different thread group and the config uses this folder name as rootMetricsPrefix -

<elementProp name="rootMetricsPrefix" elementType="Argument">
                <stringProp name="Argument.name">rootMetricsPrefix</stringProp>
                <stringProp `enter code here`name="Argument.value">${__property(graphiteFolderName)}</stringProp>
                <stringProp name="Argument.metadata">=</stringProp>
</elementProp>

      

Symptoms : The first time you run the JMeter script (after opening JMeter), no folder is created in the Graphite database. Starting from the second run, the results are written to the folder defined in the previous run. For example, Run 1: DynamicResultsFolder_1 (no results) Run 2: DynamicResultsFolder_2 (results recorded in DynamicResultsFolder_1) Run 3: DynamicResultsFolder_3 (results are written in DynamicResultsFolder_2)

When I print the folder name to the log in the main thread group, the expected folder name is displayed. The problem seems to be related to how the $ {__ (graphiteFolderName)} property is evaluated in the BackendListener configuration.

I also tried assigning the property to a local variable and using the local variable in the BackendListener config, but that doesn't write any results to the DB.

Any ideas as to what is going on here, or if I am missing something obvious?

+3


source to share


1 answer


This cannot work because the Backend Listener parameters will be passed to the components before the setUp ThreadGroup is executed.

So what happens the first time, the property is not configured and it fails, then configure the thread group and populate the property for the next run.



It's your problem.

Perhaps you could try to generate your name using __BeanShell on the rootMetricsPrefix property.

+2


source







All Articles