jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Re: Problem with CSVRead and multithread
Date Wed, 02 Aug 2006 10:13:44 GMT
On 01 Aug 2006 22:04:21 +0200, mart@interia.pl <mart@interia.pl> wrote:
> sebb napisaƂ(a):
> > > >> As long as I run one-thread tests all seems to be working
> properly.
> > The problem
> > > >> begins in case of number of threads. CSVRead allows to manage file
> > pointers in each
> > > >> thread independently but - here is the catch - each time I load
> value
> > from
> >
> > They are not independent. There is only one pointer to the next free
> row.
>
> Really?
>
> http://jakarta.apache.org/jmeter/usermanual/functions.html#__CSVRead
>
> "Each thread has its own internal pointer to its current row in the file
> array."

This is true, but not the whole story - the "next" row is determined
by taking all threads into account, i.e. there is a separate pointer
for the file as a whole.

Try it and see.

> > CSV in
> > > >> new thread - I>#039;m given not the first value from file, but
the
> next to
> > previously
> > > >> read by another thread. So - I cannot operate on the same whole
> file
> > with number of
> > > >> threads.
> > > >
> >
> > No idea what that means.
>
> I would like to iterate through whole scenario file in every thread. In
> other words - every thread should run the same scenario - module by
> module.
>

OK, understood.

> >
> > > > I>#039;ve tried to use *ALIAS statement, but it doesn>#039;t work
> for me. There
> > are no
> > > > examples of *ALIAS in manual nor in mailing lists.
> > > >
> > CSVRead(file,*ALIAS) - open file and assign to ALIAS
> > CSVRead(*ALIAS,0) - read column 0
>
> I've tried exactly the same syntax but without desired result (CSVRead
> (*ALIAS,0) have returned an empty string)
>
> >
> > CSVRead, StringFromFile and CSV Data Set are all designed to be used
> > in much the same way. The file contains multiple rows. Each time a
> > thread is ready for more data it is given the next line of data.
>
> I wanted to have the same file opened many times by all threads or the
> file opened only once but with different file pointers - one per every
> thread. I supposed CSVRead with *ALIAS will be helpful, however I couldn&#039;t
> make it working. I'll try anyway.
>

This should be possible (I don't have time to try this at present).
You will need to use different alias names for each thread.

> --
>
> Greetings,
>
> mart
>
>
> ------------------------------------------------------------------------
> Szybko i tanio ubezpiecz samochod!
> Kupno polisy zajmie Ci 15 minut! Kontakt przez telefon albo Internet.
> Kliknij i sprawdz: http://link.interia.pl/f198b
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Mime
View raw message