How to make JMeters access log sampler use timestamp for delay

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make JMeters access log sampler use timestamp for delay

Finlay Weber
I am using Jmeter's access log sampler to run a performance test. I am
following the instructions [here](
https://jmeter.apache.org/usermanual/jmeter_accesslog_sampler_step_by_step.html
)

The only problem now is the fact I realized that the access log sampler
does not make use of the timestamps in the access log to schedule the
requests, it just goes through the entry one after the other.

As I would like to reproduce, as exactly as possible, the requests as they
happen in the access log, I would require Jmeter to pace the requests based
on the timestamps in the log entries.

So far, I have not figured how to do this. Any ideas?
Reply | Threaded
Open this post in threaded view
|

Re: How to make JMeters access log sampler use timestamp for delay

Felix Schumacher

Am 19.09.20 um 08:42 schrieb Finlay Weber:

> I am using Jmeter's access log sampler to run a performance test. I am
> following the instructions [here](
> https://jmeter.apache.org/usermanual/jmeter_accesslog_sampler_step_by_step.html
> )
>
> The only problem now is the fact I realized that the access log sampler
> does not make use of the timestamps in the access log to schedule the
> requests, it just goes through the entry one after the other.
>
> As I would like to reproduce, as exactly as possible, the requests as they
> happen in the access log, I would require Jmeter to pace the requests based
> on the timestamps in the log entries.
>
> So far, I have not figured how to do this. Any ideas?

If I understand the code correctly, it has not got that feature (yet).
If you want to add it, have a look at the classes AccessLogSampler and
LogParser (and its subclasses).

The current flow seems to be like the following. The AccessLogSampler
calls the LogParser for each line and the parser configures the sampler.
After the parsing of the line, the sampler creates a sample using the
configuration that the parser did on the sampler.

To add the timers, you would have to extract the timestamps from the
lines - either before the parser parses the line, or in the parser
(seems more natural to me). Then that timestamp information has to be
transferred to the sampler and used to add a subelement on the freshly
created sample.

Feel free to open an enhancement request on bugzilla and patches are
welcome.

Felix

>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to make JMeters access log sampler use timestamp for delay

Finlay Weber
Hi Felix,

Thanks for the response and thanks for clarifying that this feature is not
currently implemented with the access log sampler...

Do you somehow think what I want to achieve can be done via the jmeter
jsr223 mechanism? I read this is a replacement of the beanshell and it
allows one to write a custom sampler...the problem is that there is little
documentation out there on how to use the jsr223 mechanism...

Before I embark on a wild goose chase, I would like confirmation from
someone more familiar with Jmeter to indicate if what I want to do is
possible or not...

On Sat, Sep 19, 2020 at 2:40 PM Felix Schumacher <
[hidden email]> wrote:

>
> Am 19.09.20 um 08:42 schrieb Finlay Weber:
> > I am using Jmeter's access log sampler to run a performance test. I am
> > following the instructions [here](
> >
> https://jmeter.apache.org/usermanual/jmeter_accesslog_sampler_step_by_step.html
> > )
> >
> > The only problem now is the fact I realized that the access log sampler
> > does not make use of the timestamps in the access log to schedule the
> > requests, it just goes through the entry one after the other.
> >
> > As I would like to reproduce, as exactly as possible, the requests as
> they
> > happen in the access log, I would require Jmeter to pace the requests
> based
> > on the timestamps in the log entries.
> >
> > So far, I have not figured how to do this. Any ideas?
>
> If I understand the code correctly, it has not got that feature (yet).
> If you want to add it, have a look at the classes AccessLogSampler and
> LogParser (and its subclasses).
>
> The current flow seems to be like the following. The AccessLogSampler
> calls the LogParser for each line and the parser configures the sampler.
> After the parsing of the line, the sampler creates a sample using the
> configuration that the parser did on the sampler.
>
> To add the timers, you would have to extract the timestamps from the
> lines - either before the parser parses the line, or in the parser
> (seems more natural to me). Then that timestamp information has to be
> transferred to the sampler and used to add a subelement on the freshly
> created sample.
>
> Feel free to open an enhancement request on bugzilla and patches are
> welcome.
>
> Felix
>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>