You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Andrej van der Zee <an...@gmail.com> on 2011/07/19 08:55:16 UTC

binary file writer

Hi,

In need to efficiently write the following fields in for each sampler
to a file or keep it in memory and dump it to a file after the test
ended, preferably in binary:

1) epoch time in sec,
2) response time,
3) sampler name,
4) success

I could not find any such listener but wondered if their exists a
similar plugin that I could use or modify.

Greets,
Andrej

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by Andrej van der Zee <an...@gmail.com>.
Hi,

> I don't think that keeping a test log in memory is a good idea. What
> size of a resulting log file do you expect?

I have 16GB 64bits machines and extra memory may be added whenever necessary.

>
> For example, in long-run tests (10 hours and more) I use the 'Simple
> File Writer' listener adjusted to write a CSV test log instead of XML.

That is what I do now.

Cheers,
Andrej

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by Valentine Petrovsky <va...@gmail.com>.
Hi Andrej,

I don't think that keeping a test log in memory is a good idea. What
size of a resulting log file do you expect?

For example, in long-run tests (10 hours and more) I use the 'Simple
File Writer' listener adjusted to write a CSV test log instead of XML.
It doesn't use much CPU time and RAM, saves disk space and contains all
the fields you need. For large test logs (more than 1GB) I use custom
Perl scripts for further analysis.

Regards,
Valentine



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by apc <ap...@apc.kg>.
Thank you, now I get it. No, FFW is not binary in this way.

-----
--
Andrey Pohilko
JP@GC Maintainer
--
View this message in context: http://jmeter.512774.n5.nabble.com/binary-file-writer-tp4611327p4612259.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by Andrej van der Zee <an...@gmail.com>.
> Hmm, I still can't get it...
> Binary means multi-byte or non-letter bytes in it. And you can save this
> data with FFW. It does not add any newlines himself, only specified fields
> and separators. So it's binary writer.

When you open a file for reading or writing in languages like
C/C++/Java you can speficy if you want to do it in binary mode or text
mode. Binary mode usually gives you a smaller file because, for
example, an integer is written in 4 bytes instead of writing the
textual representation of the integer. Moreover, when reading a binary
file you do not have to read the string representation and then
convert it to the desired type. With large datasets, this is more
efficient in terms of space and CPU cycles.

Greets,
Andrej

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by apc <ap...@apc.kg>.
Hmm, I still can't get it...
Binary means multi-byte or non-letter bytes in it. And you can save this
data with FFW. It does not add any newlines himself, only specified fields
and separators. So it's binary writer.

-----
--
Andrey Pohilko
JP@GC Maintainer
--
View this message in context: http://jmeter.512774.n5.nabble.com/binary-file-writer-tp4611327p4612128.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by Andrej van der Zee <an...@gmail.com>.
To write in binary instead of text in order to save space and make it more efficient to read large datasets into offline analisis tools.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by apc <ap...@apc.kg>.
What is "binary option"?

-----
--
Andrey Pohilko
JP@GC Maintainer
--
View this message in context: http://jmeter.512774.n5.nabble.com/binary-file-writer-tp4611327p4611956.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by Andrej van der Zee <an...@gmail.com>.
> Take a look at
> http://code.google.com/p/jmeter-plugins/wiki/FlexibleFileWriter

It does not have a binary option, does it? But I guess I could easily
add it and reuse the rest, as it contains the fields that I need.

Cheers,
Andrej

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by apc <ap...@apc.kg>.
Hi,
Take a look at
http://code.google.com/p/jmeter-plugins/wiki/FlexibleFileWriter

-----
--
Andrey Pohilko
JP@GC Maintainer
--
View this message in context: http://jmeter.512774.n5.nabble.com/binary-file-writer-tp4611327p4611924.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by sebb <se...@gmail.com>.
On 19 July 2011 08:17, Andrej van der Zee <an...@gmail.com> wrote:
>> You can write your own BSH or BSF Listener code to write the data in
>> any format you wish.
>
> In terms of performance, do you expect any remarkable difference from
> writing a custom listener in Java and using the Beanshell/BSF
> listener?

Sorry, no idea.

> Also, I want to write to the same file from different thread groups.
> Should I take care of concurrency issues inside the Beanshell/BSF
> listener or is it taken care of by JMeter's internals?

Have a look at

org.apache.jmeter.reporters.ResultCollector

which handles JTL files.

> Cheers,
> Andrej
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by Andrej van der Zee <an...@gmail.com>.
> You can write your own BSH or BSF Listener code to write the data in
> any format you wish.

In terms of performance, do you expect any remarkable difference from
writing a custom listener in Java and using the Beanshell/BSF
listener?

Also, I want to write to the same file from different thread groups.
Should I take care of concurrency issues inside the Beanshell/BSF
listener or is it taken care of by JMeter's internals?

Cheers,
Andrej

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: binary file writer

Posted by sebb <se...@gmail.com>.
On 19 July 2011 07:55, Andrej van der Zee <an...@gmail.com> wrote:
> Hi,
>
> In need to efficiently write the following fields in for each sampler
> to a file or keep it in memory and dump it to a file after the test
> ended, preferably in binary:
>
> 1) epoch time in sec,
> 2) response time,
> 3) sampler name,
> 4) success
>
> I could not find any such listener but wondered if their exists a
> similar plugin that I could use or modify.

You can write your own BSH or BSF Listener code to write the data in
any format you wish.

> Greets,
> Andrej
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org