logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-761) Move performance tests from JUnit to log4j-perf
Date Wed, 27 Apr 2016 15:51:13 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260358#comment-15260358
] 

Remko Popma commented on LOG4J2-761:
------------------------------------

I don't remember exactly... 

One drawback of moving these to log4j-perf is that they don't get run unless someone manually
selects and runs them. We should look into [running some of the JMH benchmarks from a JUnit
test|http://stackoverflow.com/questions/30485856/how-to-run-jmh-from-inside-junit-tests] and
asserting some minimum performance level. 

I often only run {{mvn clean package}} because the tests in the {{@Category(PerformanceTests.class)}}
category are so slow...
There are some valuable tests in there though: one of the deadlock tests caught a nasty bug
I had in one of my attempts to make the OutputStreamAppender and subclasses garbage-free.
That bug was not caught by the tests in {{mvn clean package}}...

I guess what I'm trying to say is that these tests need to be carefully checked one by one
before we migrate them to the normal JUnit tests, converted to a (JUnit-driven?) JMH benchmark
or leave them as is.

> Move performance tests from JUnit to log4j-perf
> -----------------------------------------------
>
>                 Key: LOG4J2-761
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-761
>             Project: Log4j 2
>          Issue Type: Test
>          Components: Core
>    Affects Versions: 2.0.1
>            Reporter: Matt Sicker
>            Priority: Minor
>              Labels: benchmark, test
>
> Firstly, all the JUnit tests marked with the category:
> {code}
> @Category(PerformanceTests.class)
> {code}
> should all be ported over to the log4j-perf module. The tests marked with this category
generally only output performance benchmark data and don't perform any actual unit testing
of their own. Now that we have several examples of how to use [JMH|http://openjdk.java.net/projects/code-tools/jmh/],
it would be a good idea to clean up our unit tests as such. This way, we don't have to waste
time in the build performing benchmark tests that aren't even verified in any way.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message