Skip to content

Commit

Permalink
Add JaCoCo test coverage with Coveralls integration.
Browse files Browse the repository at this point in the history
  • Loading branch information
sankethkatta committed Oct 30, 2015
1 parent 28931a6 commit 121efce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ What is it suitable for?

Side data can be defined as the extra read-only data needed by a process to do its job. For instance, a list of stopwords used by a natural language processing algorithm is side data. Machine learning models used in machine translation, content classification or spam detection are also side data. When this side data becomes large it can rapidly be a bottleneck for applications depending on them. PalDB aims to fill this gap.

PalDB can replace the usage of in-memory data structures to store this side data with comparable query performances and by using an order of magnitude less memory. It also greatly simplifies the code needed to operate this side data as PalDB stores are single binary files, manipulated with a very simple API (see below for examples).
PalDB can replace the usage of in-memory data structures to store this side data with comparable query performances and by using an order of magnitude less memory. It also greatly simplifies the code needed to operate this side data as PalDB stores are single binary files, manipulated with a very simple API (see below for examples).

Code samples
------------
Expand Down Expand Up @@ -59,7 +59,7 @@ StoreReader reader = PalDB.createReader(new File("store.paldb"));
Iterable<Map.Entry<String, String>> iterable = reader.iterable();
for (Map.Entry<String, String> entry : iterable) {
String key = entry.getKey();
String value = entry.getValue();
String value = entry.getValue();
}
reader.close();
```
Expand All @@ -85,6 +85,11 @@ Test

We use the TestNG framework for our unit tests. You can run them via the `gradle clean test` command.

Coverage
--------

Coverage is run using JaCoCo. You can run a report via `gradle jacocoTestReport`. The report will be generated in `paldb/build/reports/jacoco/test/html/`.

Advanced configuration
----------------------

Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0"
}
}

allprojects {
Expand All @@ -13,4 +16,4 @@ allprojects {
allprojects {
apply plugin: 'eclipse'
apply plugin: 'idea'
}
}
11 changes: 10 additions & 1 deletion paldb/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'com.github.kt3k.coveralls'

sourceCompatibility = 1.6
group = GROUP
Expand Down Expand Up @@ -36,7 +38,7 @@ perfTest {

dependencies {
compile 'org.xerial.snappy:snappy-java:1.0.5'

testCompile 'org.testng:testng:6.8.8'
testCompile 'commons-lang:commons-lang:2.6'

Expand All @@ -50,3 +52,10 @@ dependencies {
javadoc {
options.overview = "overview.html"
}

jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
}
}

0 comments on commit 121efce

Please sign in to comment.