Skip to content

Commit

Permalink
Merge branch 'release/1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Suszyński Krzysztof committed Mar 31, 2016
2 parents 81e3526 + de658cb commit b50255c
Show file tree
Hide file tree
Showing 10 changed files with 1,006 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
111 changes: 111 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
Expand All @@ -7,3 +8,113 @@ release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
### NetBeans template
nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
### Java template
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### Eclipse template
*.pydevproject
.metadata
.gradle
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath

# Eclipse Core
.project

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# JDT-specific (Eclipse Java Development Tools)
.classpath

# Java annotation processor (APT)
.factorypath

# PDT-specific
.buildpath

# sbteclipse plugin
.target

# TeXlipse plugin
.texlipse

18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: java
script: mvn clean install --fail-at-end
notifications:
email:
on_failure: true
matrix:
include:
- jdk: openjdk6
env: JACOCO=true
- jdk: openjdk7
env: JACOCO=true COVERALLS=true
- jdk: oraclejdk7
env: JACOCO=true
- jdk: oraclejdk8
env: JACOCO=true
- jdk: openjdk7
env: JACOCO=true SONAR=publish
script: mvn clean install sonar:sonar --fail-at-end
66 changes: 64 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,64 @@
# java-jmh-junit-utilities
A JMH utilities to be used in JUnit tests
# JMH Utils for JUnit
This micro library holds a set of JUnit utilities for usage with JMH testing framework.

[![Build Status](https://travis-ci.org/wavesoftware/java-jmh-junit-utilities.svg?branch=master)](https://travis-ci.org/wavesoftware/java-jmh-junit-utilities) [![Coverage Status](https://coveralls.io/repos/wavesoftware/java-jmh-junit-utilities/badge.svg?branch=master&service=github)](https://coveralls.io/github/wavesoftware/java-jmh-junit-utilities?branch=master) [![SonarQube Tech Debt](https://img.shields.io/sonar/http/sonar-ro.wavesoftware.pl/pl.wavesoftware:jmh-junit-utilities/tech_debt.svg)](http://sonar-ro.wavesoftware.pl/dashboard/index/3862) [![Dependency Status](https://www.versioneye.com/user/projects/56fd3e99fcd19a004543f5eb/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56fd3e99fcd19a004543f5eb) [![Maven Central](https://img.shields.io/maven-central/v/pl.wavesoftware/jmh-junit-utilities.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22pl.wavesoftware%22%20AND%20a%3A%22jmh-junit-utilities%22)

## General use

### `JmhCleaner` rule

JMH is kinda dirty. It leaves after himself a set of tests classes. They are placed in Maven generated sources directory and may cause a false positives in code analysis tools like SonarQube. `JmhCleaner` rule is designed to overcome that and remove any JMH generated classes.

Use it as a standard JUnit test rule or class rule. One needs to pass a test class in constructor.

Example:

```java
@ClassRule
public static JmhCleaner cleaner = new JmhCleaner(MyClassTest.class);
```

### `JavaAgentSkip` rule

JMH is, as any performance framework, sensitive to all intrussions like running java agents. Those are coverage tools (Jacoco), debuggers, profilers and so on. To overcome that one can use `JavaAgentSkip` rule to automatically skip test is JAva agent is present.

Example:

```java
@ClassRule
public static JavaAgentSkip javaAgentSkip = JavaAgentSkip.ifPresent();
```

## Maven

```xml
<dependency>
<groupId>pl.wavesoftware</groupId>
<artifactId>jmh-junit-utilities</artifactId>
<version>1.0.0</version>
</dependency>
```

## Contributing

Contributions are welcome!

To contribute, follow the standard [git flow](http://danielkummer.github.io/git-flow-cheatsheet/) of:

1. Fork it
1. Create your feature branch (`git checkout -b feature/my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin feature/my-new-feature`)
1. Create new Pull Request

Even if you can't contribute code, if you have an idea for an improvement please open an [issue](https://github.com/wavesoftware/java-jmh-junit-utilities/issues).

## Requirements

* JDK >= 1.6

### Releases

- 1.0.0
- Support for JDK >= 1.6
- Initial release
Loading

0 comments on commit b50255c

Please sign in to comment.