You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Carl Shaulis <cs...@homeaway.com> on 2009/10/28 21:21:04 UTC

Data Question

Hello,

By the way this is an active and extremely responsive forum, so THANK YOU!

I have a question regarding some data observations.  We ran a load test
using a script with 5 thread groups.  We save the data into a .csv file then
import the data into MySQL.

Some of the requests show 40K bytes, but have a latency that equals 0.

Discussing this amongst the team we conclude that these requests are being
redirected.

I guess I can understand why the latency might be zero, but I am not sure
why the report indicates a large file size.

Any thoughts?

Since I have your attention does anyone have a baked SQL script for
returning average latency per thread group?  :o)

Thanks,

Carl

Re: Data Question

Posted by sebb <se...@gmail.com>.
On 28/10/2009, Nikolay_Miroshnichenko <ni...@gmail.com> wrote:
> Carl Shaulis wrote:
>
> > Hello,
> >
> > By the way this is an active and extremely responsive forum, so THANK YOU!
> >
> > I have a question regarding some data observations.  We ran a load test
> > using a script with 5 thread groups.  We save the data into a .csv file
> then
> > import the data into MySQL.
> >
> > Some of the requests show 40K bytes, but have a latency that equals 0.
> >
> > Discussing this amongst the team we conclude that these requests are being
> > redirected.
> >
> > I guess I can understand why the latency might be zero, but I am not sure
> > why the report indicates a large file size.
> >
> > Any thoughts?
> >
> > Since I have your attention does anyone have a baked SQL script for
> > returning average latency per thread group?  :o)
> >
> > Thanks,
> >
> > Carl
> >
> >
>
>  Hi,
>
>  sorry, I have no answer for you but a question :)

Please start a new thread when asking a new question.

>  Could you tell me how you load csv to mysql? I haven't searched the web
> yet, so you maybe should simply say to do it.
>
>  And what table structure do you use? It's interesting how to store
> timestamps with milliseconds - in two fields of types date and number?
>
>  --
>  Best Regards
>  Nikolay Miroshnichenko
>
>
>
>
> ---------------------------------------------------------------------
>  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


How to import data to MySQL

Posted by Carl Shaulis <cs...@homeaway.com>.
Thanks Sebb!  I certainly will try to be more diligent when a topic shifts.
Excellent point!

Carl


On 10/28/09 10:26 PM, "Carl Shaulis" <cs...@homeaway.com> wrote:

> Please keep in mind that these commands are dependent on what data you tell
> JMeter to save in the .csv file.  I use the summary report and toggle almost
> all non-xml components.  The CSV headers are not required since the command
> below created the column names.
> 
> Login to mysql
> 
> mysql> create database Test
>     -> ;
> Query OK, 1 row affected (0.03 sec)
> 
> mysql> use Test;
> Database changed
> 
> mysql> create table test_data(timeStamp BIGINT(20), elapsed BIGINT(20),
> label VARCHAR(254), responseCode INT(4), responseMessage VARCHAR(254),
> threadName VARCHAR(254), dataType VARCHAR(254), success VARCHAR(254), bytes
> BIGINT(20), grpThreads BIGINT(20), allThreads BIGINT(20), URL VARCHAR(254),
> Latency BIGINT(20), SampleCount BIGINT(20), ErrorCount BIGINT(20), Hostname
> VARCHAR(254))ENGINE=InnoDB;
> Query OK, 0 rows affected (0.23 sec)
> 
> mysql> LOAD DATA LOCAL INFILE '<filename>.csv' INTO TABLE test_data FIELDS
> TERMINATED BY ',' LINES TERMINATED BY '\n'
> (timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,su
> ccess,bytes,grpThreads,allThreads,URL,Latency,SampleCount,ErrorCount,Hostnam
> e);
> 
> I have a MacPro, so I use MSQL query browser to evaluate the results.  I am
> still learning SQL.
> 
> Good luck!
> 
> Carl
> 
> 
> On 10/28/09 5:45 PM, "Nikolay_Miroshnichenko" <ni...@gmail.com> wrote:
> 
>> Carl Shaulis wrote:
>>> Hello,
>>> 
>>> By the way this is an active and extremely responsive forum, so THANK YOU!
>>> 
>>> I have a question regarding some data observations.  We ran a load test
>>> using a script with 5 thread groups.  We save the data into a .csv file then
>>> import the data into MySQL.
>>> 
>>> Some of the requests show 40K bytes, but have a latency that equals 0.
>>> 
>>> Discussing this amongst the team we conclude that these requests are being
>>> redirected.
>>> 
>>> I guess I can understand why the latency might be zero, but I am not sure
>>> why the report indicates a large file size.
>>> 
>>> Any thoughts?
>>> 
>>> Since I have your attention does anyone have a baked SQL script for
>>> returning average latency per thread group?  :o)
>>> 
>>> Thanks,
>>> 
>>> Carl
>>> 
>> 
>> Hi,
>> 
>> sorry, I have no answer for you but a question :)
>> 
>> Could you tell me how you load csv to mysql? I haven't searched the web
>> yet, so you maybe should simply say to do it.
>> 
>> And what table structure do you use? It's interesting how to store
>> timestamps with milliseconds - in two fields of types date and number?
> 
> 
> ---------------------------------------------------------------------
> 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: Data Question

Posted by Carl Shaulis <cs...@homeaway.com>.
Please keep in mind that these commands are dependent on what data you tell
JMeter to save in the .csv file.  I use the summary report and toggle almost
all non-xml components.  The CSV headers are not required since the command
below created the column names.

Login to mysql

mysql> create database Test
    -> ;
Query OK, 1 row affected (0.03 sec)

mysql> use Test;
Database changed

mysql> create table test_data(timeStamp BIGINT(20), elapsed BIGINT(20),
label VARCHAR(254), responseCode INT(4), responseMessage VARCHAR(254),
threadName VARCHAR(254), dataType VARCHAR(254), success VARCHAR(254), bytes
BIGINT(20), grpThreads BIGINT(20), allThreads BIGINT(20), URL VARCHAR(254),
Latency BIGINT(20), SampleCount BIGINT(20), ErrorCount BIGINT(20), Hostname
VARCHAR(254))ENGINE=InnoDB;
Query OK, 0 rows affected (0.23 sec)

mysql> LOAD DATA LOCAL INFILE '<filename>.csv' INTO TABLE test_data FIELDS
TERMINATED BY ',' LINES TERMINATED BY '\n'
(timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,su
ccess,bytes,grpThreads,allThreads,URL,Latency,SampleCount,ErrorCount,Hostnam
e);

I have a MacPro, so I use MSQL query browser to evaluate the results.  I am
still learning SQL.

Good luck!

Carl


On 10/28/09 5:45 PM, "Nikolay_Miroshnichenko" <ni...@gmail.com> wrote:

> Carl Shaulis wrote:
>> Hello,
>> 
>> By the way this is an active and extremely responsive forum, so THANK YOU!
>> 
>> I have a question regarding some data observations.  We ran a load test
>> using a script with 5 thread groups.  We save the data into a .csv file then
>> import the data into MySQL.
>> 
>> Some of the requests show 40K bytes, but have a latency that equals 0.
>> 
>> Discussing this amongst the team we conclude that these requests are being
>> redirected.
>> 
>> I guess I can understand why the latency might be zero, but I am not sure
>> why the report indicates a large file size.
>> 
>> Any thoughts?
>> 
>> Since I have your attention does anyone have a baked SQL script for
>> returning average latency per thread group?  :o)
>> 
>> Thanks,
>> 
>> Carl
>> 
> 
> Hi,
> 
> sorry, I have no answer for you but a question :)
> 
> Could you tell me how you load csv to mysql? I haven't searched the web
> yet, so you maybe should simply say to do it.
> 
> And what table structure do you use? It's interesting how to store
> timestamps with milliseconds - in two fields of types date and number?


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


Re: Data Question

Posted by Nikolay_Miroshnichenko <ni...@gmail.com>.
Carl Shaulis wrote:
> Hello,
> 
> By the way this is an active and extremely responsive forum, so THANK YOU!
> 
> I have a question regarding some data observations.  We ran a load test
> using a script with 5 thread groups.  We save the data into a .csv file then
> import the data into MySQL.
> 
> Some of the requests show 40K bytes, but have a latency that equals 0.
> 
> Discussing this amongst the team we conclude that these requests are being
> redirected.
> 
> I guess I can understand why the latency might be zero, but I am not sure
> why the report indicates a large file size.
> 
> Any thoughts?
> 
> Since I have your attention does anyone have a baked SQL script for
> returning average latency per thread group?  :o)
> 
> Thanks,
> 
> Carl
> 

Hi,

sorry, I have no answer for you but a question :)

Could you tell me how you load csv to mysql? I haven't searched the web 
yet, so you maybe should simply say to do it.

And what table structure do you use? It's interesting how to store 
timestamps with milliseconds - in two fields of types date and number?

-- 
Best Regards
Nikolay Miroshnichenko



Re: Data Question

Posted by sebb <se...@gmail.com>.
On 29/10/2009, Ronan Klyne <ro...@groupbc.com> wrote:
> Carl Shaulis wrote:
>
> > Hello,
> >
> > By the way this is an active and extremely responsive forum, so THANK YOU!
> >
> > I have a question regarding some data observations.  We ran a load test
> > using a script with 5 thread groups.  We save the data into a .csv file
> then
> > import the data into MySQL.
> >
> > Some of the requests show 40K bytes, but have a latency that equals 0.
> >
> > Discussing this amongst the team we conclude that these requests are being
> > redirected.
> >
> > I guess I can understand why the latency might be zero, but I am not sure
> > why the report indicates a large file size.
> >
> >
> >
>  I thought the latency was the time to the first byte, and the elapsed time
> was the total. See
> http://jakarta.apache.org/jmeter/usermanual/listeners.html#csvlogformat
>
>  If I'm wrong, I'd like to be corrected...

You are not wrong.

Strictly speaking, latency is time to first response, which will in
general be more than 1 byte. JMeter relies on Java and the OS to do
the buffering, so can't easily check time to first byte.

Note that some samplers don't measure the latency, in which case it
will always be zero.

>  Ronan
>
> > Any thoughts?
> >
> > Since I have your attention does anyone have a baked SQL script for
> > returning average latency per thread group?  :o)
> >
> > Thanks,
> >
> > Carl
> >
> >
> >
>
>
> ---------------------------------------------------------------------
>  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: Data Question

Posted by Ronan Klyne <ro...@groupbc.com>.
Carl Shaulis wrote:
> Hello,
>
> By the way this is an active and extremely responsive forum, so THANK YOU!
>
> I have a question regarding some data observations.  We ran a load test
> using a script with 5 thread groups.  We save the data into a .csv file then
> import the data into MySQL.
>
> Some of the requests show 40K bytes, but have a latency that equals 0.
>
> Discussing this amongst the team we conclude that these requests are being
> redirected.
>
> I guess I can understand why the latency might be zero, but I am not sure
> why the report indicates a large file size.
>
>   
I thought the latency was the time to the first byte, and the elapsed 
time was the total. See 
http://jakarta.apache.org/jmeter/usermanual/listeners.html#csvlogformat

If I'm wrong, I'd like to be corrected...

Ronan
> Any thoughts?
>
> Since I have your attention does anyone have a baked SQL script for
> returning average latency per thread group?  :o)
>
> Thanks,
>
> Carl
>
>   


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


Re: Data Question

Posted by Deepak Shetty <sh...@gmail.com>.
>Discussing this amongst the team we conclude that these requests are being
redirected.
You could verify this by using Follow redirects (instead of redirect
automatically). In this case in view Results Tree listener you would see
multiple requests grouped under 1 main request. if you use XML as the result
type  then you can see this in the JTL file as well (Not sure what you get
in CSV)
> I guess I can understand why the latency might be zero, but I am not sure
>why the report indicates a large file size.
Because it's giving you the size of the redirected url (the second request).
If you want to record this as separate requests then you must uncheck both
follow redirects and redirect automatically, write a post processor to
extract out the location header and make a separate request to it.



regards
deepak

On Wed, Oct 28, 2009 at 1:21 PM, Carl Shaulis <cs...@homeaway.com> wrote:

> Hello,
>
> By the way this is an active and extremely responsive forum, so THANK YOU!
>
> I have a question regarding some data observations.  We ran a load test
> using a script with 5 thread groups.  We save the data into a .csv file
> then
> import the data into MySQL.
>
> Some of the requests show 40K bytes, but have a latency that equals 0.
>
> Discussing this amongst the team we conclude that these requests are being
> redirected.
>
> I guess I can understand why the latency might be zero, but I am not sure
> why the report indicates a large file size.
>
> Any thoughts?
>
> Since I have your attention does anyone have a baked SQL script for
> returning average latency per thread group?  :o)
>
> Thanks,
>
> Carl
>