Search code examples
rubyruby-jmeter

RubyJmeter : listeners configuration?


I'm using ruby-jmeter to perform load tests on my rails API. I wrote a simple test like this :

test do
  threads count: 1, loops: 50 do
    transaction name: 'My API' do
      visit name: 'Products', url: "#{BASE_URI}/api/products"
    end
  end

  view_results_tree
  response_time_graph
end.run(path: "#{JMETER_PATH}", gui: true)

However the default response_time_graph listener generated has a default 10000ms interval, which I would like to set to 1000ms. But I didn't find any information about this in the docs, and it seems like no one tried this before...

I tried to edit the interval with the JMeter GUI and found out that it added this line in the .jmx xml file :

<stringProp name="RespTimeGraph.interval">1000</stringProp>

But I can't find how to set this from my ruby code. I saw in the source code that the dsl method takes parameters, but I can't find how to set them properly. See https://github.com/flood-io/ruby-jmeter/blob/master/lib/ruby-jmeter/dsl/response_time_graph.rb

Thanks in advance


Solution

  • This is not supported as of ruby-jmeter 2.13.7 It will need a pull request to implement it.