Re: question about Grinder test data to database

Philip Aston <[email protected]> Sat, 26 Jul 2014 06:22:01 +0100
Newsgroups gmane.comp.java.grinder.user
Message-ID <[email protected]>
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!
>
>  
>
>  
>
>  
>
>  
>
> -- 
> Oracle <http://www.oracle.com/>
> Yan Gang
>
>
> ORACLE China
>
> Green Oracle <http://www.oracle.com/commitment>
>
> 	
>
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/grinder-use