Skip to content

How to dynamically create samples #5733

@frgirard

Description

@frgirard

The documentation URL

https://jmeter.apache.org/usermanual/component_reference.html#JSR223_Sampler

Feedback

I need a JSR223 groovy script to be able to dynamically create samples. This script receives kafka records which have headers including processing times. I'd like to be able to create samples using these timestamp info.
In my script, I create sampleresults :

def sr = new org.apache.jmeter.samplers.SampleResult(t_in, t_out - t_in)

But there's no way I know to add this sampleresult to JMeter results (.jtl, listeners...).
How could I do that ?
Thanks a lot !

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions