Re: question about Grinder test data to database
Gang Yan <[email protected]> Mon, 28 Jul 2014 01:14:31 -0700 (PDT)
| Newsgroups | gmane.comp.java.grinder.user |
|---|---|
| Message-ID | <e713a55b-0bde-4716-98d0-1f5f81f886fa@default> |
Hi Philip: Thank you reply! I want to grinder log and system monitor data into database During the performance test. Grinder can support ? -- HYPERLINK "http://www.oracle.com/" \nOracle Yan Gang ORACLE China HYPERLINK "http://www.oracle.com/commitment" \nGreen Oracle Oracle is committed to developing practices and products that help protect the environment From: Philip Aston [mailto:[email protected]] Sent: 2014年7月28日 15:50 To: grinder-use Subject: Re: [Grinder-use] question about Grinder test data to database Its the information you would normally get in the data log. For example, from the first line the value of FORMATTED_MESSAGE is "9, 0, 1, 1406366885343, 1462, 0". It can be parsed as follows: Thread = 9 Run = 0 Test = 1 Start time (ms since Epoch) = 1406366885343 Test time = 1462 ms Errors = 0 If you use the HTTP plug-in or custom statistics, there may be additional comma separated fields. - Phil On 26/07/14 12:47, Gang Yan wrote: Hi Philip I have question about table logging_event: I don’t know about Field formatted_message.? select TIMESTMP , FORMATTED_MESSAGE , LOGGER_NAME ,THREAD_NAME,REFERENCE_FLAG ,caller_method ,caller_class from logging_eventlogging_event 1406366886806 9, 0, 1, 1406366885343, 1462, 0 data thread 9 1 report net.grinder.engine.process.ThreadDataLogger 1406366886844 3, 0, 1, 1406366885551, 1293, 0 data thread 3 1 report net.grinder.engine.process.ThreadDataLogger 1406366886985 4, 0, 1, 1406366885456, 1528, 0 data thread 4 1 report net.grinder.engine.process.ThreadDataLogger 1406366887218 2, 0, 1, 1406366886104, 1114, 0 data thread 2 1 report net.grinder.engine.process.ThreadDataLogger 1406366887297 7, 0, 1, 1406366886031, 1265, 0 data thread 7 1 report net.grinder.engine.process.ThreadDataLogger 1406366887575 6, 0, 1, 1406366886245, 1329, 0 data thread 6 1 report net.grinder.engine.process.ThreadDataLogger 1406366887640 0, 0, 1, 1406366886196, 1444, 0 data thread 0 1 report net.grinder.engine.process.ThreadDataLogger 1406366887945 9, 0, 1, 1406366886863, 1082, 0 data thread 9 1 report net.grinder.engine.process.ThreadDataLogger 1406366888058 1, 0, 1, 1406366886604, 1454, 0 data thread 1 1 report net.grinder.engine.process.ThreadDataLogger 1406366837754 4, 0, 1, 1406366836375, 1379, 0 data thread 4 1 report net.grinder.engine.process.ThreadDataLogger 1406366934037 7, 0, 1, 1406366932729, 1308, 0 data thread 7 1 report net.grinder.engine.process.ThreadDataLogger 1406366934835 9, 0, 1, 1406366933351, 1484, 0 data thread 9 1 report net.grinder.engine.process.ThreadDataLogger 1406366935544 7, 0, 1, 1406366934087, 1457, 0 data thread 7 1 report net.grinder.engine.process.ThreadDataLogger 1406366935670 0, 0, 1, 1406366934217, 1453, 0 data thread 0 1 report net.grinder.engine.process.ThreadDataLogger 1406366936171 9, 0, 1, 1406366934886, 1285, 0 data thread 9 1 report net.grinder.engine.process.ThreadDataLogger 1406366937061 3, 0, 1, 1406366935764, 1297, 0 data thread 3 1 report net.grinder.engine.process.ThreadDataLogger 1406366937681 8, 0, 1, 1406366936203, 1477, 0 data thread 8 1 report net.grinder.engine.process.ThreadDataLogger 1406366938916 9, 0, 1, 1406366937597, 1318, 0 data thread 9 1 report net.grinder.engine.process.ThreadDataLogger 1406366939714 3, 0, 1, 1406366938574, 1139, 0 data thread 3 1 report net.grinder.engine.process.ThreadDataLogger 1406366939800 0, 0, 1, 1406366938339, 1460, 0 data thread 0 1 report net.grinder.engine.process.ThreadDataLogger 1406366941118 3, 0, 1, 1406366939766, 1351, 0 data thread 3 1 report net.grinder.engine.process.ThreadDataLogger 1406366941563 8, 0, 1, 1406366940368, 1195, 0 data thread 8 1 report net.grinder.engine.process.ThreadDataLogger 1406366942471 0, 0, 1, 1406366941083, 1388, 0 data thread 0 1 report net.grinder.engine.process.ThreadDataLogger 1406366944124 6, 0, 1, 1406366942877, 1247, 0 data thread 6 1 report net.grinder.engine.process.ThreadDataLogger 1406366945355 7, 0, 1, 1406366944053, 1301, 0 data thread 7 1 report net.grinder.engine.process.ThreadDataLogger 1406366946851 3, 0, 1, 1406366945412, 1438, 0 data thread 3 1 report net.grinder.engine.process.ThreadDataLogger 1406366949905 7, 0, 1, 1406366948435, 1470, 0 data thread 7 1 report net.grinder.engine.process.ThreadDataLogger 1406366949966 4, 0, 1, 1406366948531, 1435, 0 data thread 4 1 report net.grinder.engine.process.ThreadDataLogger 1406366950327 9, 0, 1, 1406366948993, 1334, 0 data thread 9 1 report net.grinder.engine.process.ThreadDataLogger 1406366847135 2, 0, 1, 1406366845671, 1464, 0 data thread 2 1 report net.grinder.engine.process.ThreadDataLogger 1406366870158 9, 0, 1, 1406366868875, 1283, 0 data thread 9 1 report net.grinder.engine.process.ThreadDataLogger 1406366914845 1, 0, 1, 1406366913616, 1229, 0 data thread 1 1 report net.grinder.engine.process.ThreadDataLogger -- From: Philip Aston [mailto:[email protected]] Sent: 2014年7月26日 13:22 To: grinder-use Subject: Re: [Grinder-use] question about Grinder test data to database I'm sure logback will simply append to the table. You should check that your database configuration allocates sufficient tablespace. - Phil On 25/07/14 15:23, Gang Yan wrote: Hi Philip: I’m now store Grinder test data to database. Thank you help! I have question about database table. 1: My will be executed test many times. I want to extend table logging_event. What to do? Thank! -- HYPERLINK "http://www.oracle.com/" \nOracle Yan Gang ORACLE China HYPERLINK "http://www.oracle.com/commitment" \nGreen Oracle Oracle is committed to developing practices and products that help protect the environment From: Philip Aston [mailto:[email protected]] Sent: 2014年7月11日 19:23 To: grinder-use Subject: Re: [Grinder-use] question about Grinder test data to database On 10/07/14 12:50, Gang Yan wrote: Hi All: I want to send Grinder test data to database. I execute follow this link: http://grinder.sourceforge.net/g3/logging.html I have question: 1: modify logback-worker.xml,Add follow content: <logger name="data" additivity="false"> <appender-ref ref="data-file" /> <appender-ref ref="data-db" /> </logger> Previous content need to keep or delete? <logger name="worker" additivity="false"> <appender-ref ref="log-file" /> </logger> <logger name="data" additivity="false"> <appender-ref ref="data-file" /> </logger> Change the "data" logger so it has the additional appender line. Don't delete the "worker" logger, or you'll disable the normal logging. 2: Create suitable user in database? Execute follow SQL? Yes, that looks right to me. Make sure you're using the DDL script that corresponds to the version of logback. For The Grinder 3.11, its logback 1.0.0 => https://github.com/qos-ch/logback/blob/v_1.0.0/logback-classic/src/main/java/ch/qos/logback/classic/db/dialect/oracle.sql For more information, refer to http://logback.qos.ch/manual/appenders.html#DBAppender -- This SQL script creates the required tables by ch.qos.logback.classic.db.DBAppender -- It is intended for Oracle databases. -- The following lines are useful in cleaning any previous tables --drop TRIGGER logging_event_id_seq_trig; --drop SEQUENCE logging_event_id_seq; --drop table logging_event_property; --drop table logging_event_exception; --drop table logging_event; CREATE SEQUENCE logging_event_id_seq MINVALUE 1 START WITH 1; CREATE TABLE logging_event ( timestmp NUMBER(20) NOT NULL, formatted_message VARCHAR2(4000) NOT NULL, logger_name VARCHAR(254) NOT NULL, level_string VARCHAR(254) NOT NULL, thread_name VARCHAR(254), reference_flag SMALLINT, caller_filename VARCHAR(254) NOT NULL, caller_class VARCHAR(254) NOT NULL, caller_method VARCHAR(254) NOT NULL, caller_line CHAR(4) NOT NULL, event_id NUMBER(10) PRIMARY KEY ); CREATE TRIGGER logging_event_id_seq_trig BEFORE INSERT ON logging_event FOR EACH ROW BEGIN SELECT logging_event_id_seq.NEXTVAL INTO :NEW.event_id FROM DUAL; END logging_event_id_seq_trig; CREATE TABLE logging_event_property ( event_id NUMBER(10) NOT NULL, mapped_key VARCHAR2(254) NOT NULL, mapped_value VARCHAR2(1024), PRIMARY KEY(event_id, mapped_key), FOREIGN KEY (event_id) REFERENCES logging_event(event_id) ); CREATE TABLE logging_event_exception ( event_id NUMBER(10) NOT NULL, i SMALLINT NOT NULL, trace_line VARCHAR2(254) NOT NULL, PRIMARY KEY(event_id, i), FOREIGN KEY (event_id) REFERENCES logging_event(event_id) ); ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ grinder-use mailing list HYPERLINK "mailto:[email protected]"[email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ grinder-use mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/grinder-use