Sounds good, especially if we can get Jenkins working again.

Sent from my iPhone

> On May 17, 2014, at 12:44 PM, Matt Sicker <[email protected]> wrote:
> 
> I have a better idea regarding the performance tests. We can use JUnit 
> categories for perf tests and integration tests: 
> https://github.com/junit-team/junit/wiki/Categories
> 
> Then we can have a maven profile for running those tests (along with enabling 
> that profile on the build server). Good idea?
> 
> 
>> On 17 May 2014 13:12, Gary Gregory <[email protected]> wrote:
>> This is getting silly.  Why not reduce the loop to 3 then? I think the large 
>> loop is there to test robustness.  How about a compromise?  Keep your 
>> changes but allow a command line override to test all of log4j with more 
>> data thrown at it? Different tests could use this factor...
>> 
>> Gary
>> 
>> 
>> -------- Original message --------
>> From: [email protected]
>> Date:05/17/2014 11:28 (GMT-05:00)
>> To: [email protected]
>> Subject: svn commit: r1595497 - 
>> /logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
>> 
>> Author: rpopma
>> Date: Sat May 17 15:28:29 2014
>> New Revision: 1595497
>> 
>> URL: http://svn.apache.org/r1595497
>> Log:
>> performance improvement: reduce time taken by performance test from 7.5 
>> seconds to 2.5 seconds (2 tests, gain=10 seconds)
>> 
>> Modified:
>>     
>> logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
>> 
>> Modified: 
>> logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
>> URL: 
>> http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java?rev=1595497&r1=1595496&r2=1595497&view=diff
>> ==============================================================================
>> --- 
>> logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
>>  (original)
>> +++ 
>> logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
>>  Sat May 17 15:28:29 2014
>> @@ -226,20 +226,20 @@ public abstract class AbstractJdbcAppend
>>      }
>> 
>>      @Test
>> -    public void testPerformanceOfAppenderWith10000Events() throws Exception 
>> {
>> +    public void testPerformanceOfAppenderWith1000Events() throws Exception {
>>          this.setUp("fmLogEntry", "log4j2-" + this.databaseType + 
>> "-factory-method.xml");
>> 
>>          final RuntimeException exception = new RuntimeException("Hello, 
>> world!");
>> 
>>          final Logger logger = 
>> LogManager.getLogger(this.getClass().getName() +
>> -                ".testPerformanceOfAppenderWith10000Events");
>> +                ".testPerformanceOfAppenderWith1000Events");
>>          logger.info("This is a warm-up message.");
>> 
>>          System.out.println("Starting a performance test for JDBC Appender 
>> for " + this.databaseType + '.');
>> 
>>          long start = System.nanoTime();
>> 
>> -        for(int i = 0; i < 10000; i++) {
>> +        for(int i = 0; i < 1000; i++) {
>>              if (i % 25 == 0) {
>>                  logger.warn("This is an exception message.", exception);
>>              } else {
>> @@ -255,9 +255,9 @@ public abstract class AbstractJdbcAppend
>>          final ResultSet resultSet = statement.executeQuery("SELECT * FROM 
>> fmLogEntry ORDER BY id");
>> 
>>          resultSet.last();
>> -        assertEquals("The number of records is not correct.", 10001, 
>> resultSet.getRow());
>> +        assertEquals("The number of records is not correct.", 1001, 
>> resultSet.getRow());
>> 
>> -        System.out.println("Wrote 10,000 log events in " + elapsed + " 
>> nanoseconds (" + elapsedMilli +
>> +        System.out.println("Wrote 1,000 log events in " + elapsed + " 
>> nanoseconds (" + elapsedMilli +
>>                  " milliseconds) for " + this.databaseType + '.');
>>      }
>> }
> 
> 
> 
> -- 
> Matt Sicker <[email protected]>

Reply via email to