In JMeter's Backend Listener, what does setting summaryOnly to true do to samplersList?
answer
- One switch can disable the other
- A cumulated series is always sent
- Read only when detail is enabled
- The two shipped clients differ by default
basics
~10 sSetting summaryOnly to true switches per-sampler metrics off entirely, so samplersList is never consulted and only the cumulated series is sent. The filter has no effect until summaryOnly is false.
solid answer
~40 s`GraphiteBackendListenerClient` tests `if (!summaryOnly)` before it ever looks at the filter, so with `summaryOnly=true` the `samplersList` and `useRegexpForSamplersList` rows are dead configuration. Whatever the setting, the client also accumulates every result into a cumulated bucket - published by the Graphite client under the sampler name `all`, and by the InfluxDB client with `transaction=all`. `samplersList` is a semicolon-separated list of exact sample labels; with `useRegexpForSamplersList=true` it is instead one regular expression matched against the whole label. The InfluxDB client spells the same idea as a single `samplersRegex` row, matched as a substring search. The two ship with opposite defaults: the Graphite client's default arguments set `summaryOnly=true`, the InfluxDB client's set `summaryOnly=false` alongside `samplersRegex=.*`.
code
properties · 13 lines# Parameters table of a Backend Listener using GraphiteBackendListenerClient
graphiteMetricsSender = org.apache.jmeter.visualizers.backend.graphite.TextGraphiteMetricsSender
graphiteHost = graphite.internal
graphitePort = 2003
rootMetricsPrefix = soak.checkout.
summaryOnly = false
samplersList = Login;Search;Add to cart;Checkout
useRegexpForSamplersList = false
percentiles = 90;95;99
# Same idea on InfluxdbBackendListenerClient: one regex row instead of a list
summaryOnly = false
samplersRegex = (Login|Search|Checkout)go deeper
Know the two rows by name and that one can silence the other. summaryOnly true means one aggregate series; summaryOnly false is what lets a per-sampler filter matter at all.
Explain the order of the checks: the client tests summaryOnly first and only then matches the label against the filter, while the cumulated bucket is fed on every result regardless.
Show that you check the shipped defaults per client instead of assuming. The InfluxDB client arrives with summaryOnly=false and samplersRegex=.*, so it emits a series per transaction from the first run.
Own the convention: decide whether plans emit per-transaction detail by default or opt into it, and name who reviews the filter when someone adds a sampler to a plan.
## The check happens in that order Inside `GraphiteBackendListenerClient.handleSampleResults` the code reads, for every result: 1. add the result to the run-wide user metrics; 2. `if (!summaryOnly)` - and only inside that branch, match the label against the filter and, on a match, feed a per-label `SamplerMetric`; 3. add the result to the cumulated bucket, unconditionally. So `summaryOnly` is not a filter of its own that stacks with `samplersList`. It is a gate in front of the filter. With `summaryOnly=true` the `samplersList` and `useRegexpForSamplersList` rows are dead configuration: they are parsed at setup and then never consulted. `InfluxdbBackendListenerClient` has the same gate, written as `if (!summaryOnly && matcher.find())`. ## The cumulated bucket is always sent Step 3 runs whatever the settings, which is why a Backend Listener never goes silent. The Graphite client publishes that bucket under the sampler name `all`, so you get `all.a.count`, `all.ok.count`, `all.ko.count`, min, max, average and the configured percentiles. The InfluxDB client writes it with `transaction=all` and `statut=all`. Alongside it go the five run-wide thread metrics - `minAT`, `maxAT`, `meanAT`, `startedT`, `endedT` - which no filter touches either; Graphite files them under a `test` context, InfluxDB under `transaction=internal`. ## The two clients spell the filter differently | | Graphite client | InfluxDB client | |---|---|---| | Filter row | `samplersList` | `samplersRegex` | | Default filter | empty | `.*` | | Interpretation | semicolon-separated exact labels, or one regex when `useRegexpForSamplersList=true` | always a regex | | Match style | set membership, or a whole-string regex match | regex substring search | | Shipped `summaryOnly` | `true` | `false` | Two consequences follow from that last row. Drop a Backend Listener on a plan, choose the Graphite client, list four samplers and you will see nothing but `all` until you also set `summaryOnly=false`. Choose the InfluxDB client and leave the table alone and you get the opposite surprise: a series per transaction from the very first flush, because `summaryOnly=false` and `samplersRegex=.*` are both already there. (The component reference's parameter table still describes the InfluxDB client's `summaryOnly` as defaulting to `true`; the shipped default arguments and the setup code both use `false`.) ## Getting the match right The Graphite client's regex mode uses a **whole-string** match: `Checkout` will not match the label `Checkout page`. The InfluxDB client uses a **substring** search, so `Checkout` does match `Checkout page` - and `.` matches anything, so a careless regex quietly widens the filter. In list mode the labels are split on `;` and compared exactly, including any leading or trailing spaces you typed into the field. Two practical habits follow: - **Name the filter explicitly** rather than relying on `.*`, so that adding a sampler to the plan is a deliberate decision about what gets streamed rather than an accident. - **Check the label, not the element name you think you used.** The filter matches the sample label, which for a Transaction Controller with a generated parent sample is the controller's name, not the child sampler's. What those extra per-label series cost to store, index and query is a question for whoever runs the metrics platform, not for the test plan; the plan's job is to make the choice explicit.
- With summaryOnly true, what does the Graphite client still send?The cumulated bucket, published under the sampler name `all` - `a.count`, `ok.count`, `ko.count`, min, max, average and the configured percentiles - plus the five thread metrics under the `test` context: `minAT`, `maxAT`, `meanAT`, `startedT` and `endedT`. You lose the per-label breakdown, not the run's overall shape.
- How does useRegexpForSamplersList change the way samplersList is read?With it false, `samplersList` is split on semicolons into a set of exact labels and membership is tested. With it true, the whole string is compiled as one pattern and the label must match it end to end. It belongs to the Graphite client only; the InfluxDB client has just `samplersRegex`.
saying these in an interview costs you the question
- Thinks samplersList still works while summaryOnly is true
- Assumes both shipped clients default the same way
- Believes an empty samplersList means every sampler
- Expects per-label series without touching summaryOnly
- Confuses samplersList with the samplersRegex row