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/29 04:31:32 UTC
How to import data to MySQL
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