Skip to content

Commit

Permalink
Fix jmh fatJar to include service loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-manes committed Oct 17, 2015
1 parent 561e35e commit bb7a42c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 20 deletions.
3 changes: 1 addition & 2 deletions caffeine/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ jar.manifest {
'com.github.benmanes.caffeine',
'com.github.benmanes.caffeine.base',
'com.github.benmanes.caffeine.cache',
'com.github.benmanes.caffeine.cache.stats',
'com.github.benmanes.caffeine.locks'
'com.github.benmanes.caffeine.cache.stats'
}

task generateLocalCaches(type: JavaExec) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.github.benmanes.caffeine.cache.impl;

import com.github.benmanes.caffeine.cache.BasicCache;
import com.github.benmanes.caffeine.cache.CacheType;
import com.trivago.triava.tcache.EvictionPolicy;
import com.trivago.triava.tcache.TCacheFactory;
import com.trivago.triava.tcache.eviction.Cache;
Expand All @@ -28,6 +29,7 @@ public final class TCache<K, V> implements BasicCache<K, V> {

public TCache(int maximumSize, EvictionPolicy policy) {
cache = TCacheFactory.standardFactory().<K, V>builder()
.setConcurrencyLevel(CacheType.CONCURRENCY_LEVEL)
.setExpectedMapSize(maximumSize)
.setEvictionPolicy(policy)
.build();
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ final class FrequencySketch<E> {
* fixed depth of four balances the accuracy and cost, resulting in a width of four times the
* length of the array. To retain an accurate estimation the array's length equals the maximum
* number of entries in the cache, increased to the closest power-of-two to exploit more efficient
* bit masking. This configuration results in a confidence of 93.75% and error bound of
* epsilon / width.
* bit masking. This configuration results in a confidence of 93.75% and error bound of e / width.
*
* The frequency of all entries is aged periodically using a sampling window based on the maximum
* number of entries in the cache. This is referred to as the reset operation by TinyLfu and keeps
Expand Down
2 changes: 2 additions & 0 deletions gradle/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ ext {
nexus: '2.3.1',
versions: '0.11.3',
semantic_versioning: '1.1.0',
shadow: '1.2.2',
stats: '0.1.5',
]

Expand Down Expand Up @@ -151,6 +152,7 @@ ext {
jmh: "me.champeau.gradle:jmh-gradle-plugin:${plugin_versions.jmh}",
nexus: "com.bmuschko:gradle-nexus-plugin:${plugin_versions.nexus}",
semantic_versioning: "io.ehdev:gradle-semantic-versioning:${plugin_versions.semantic_versioning}",
shadow: "com.github.jengelman.gradle.plugins:shadow:${plugin_versions.shadow}",
stats: "org.kordamp.gradle:stats-gradle-plugin:${plugin_versions.stats}",
versions: "com.github.ben-manes:gradle-versions-plugin:${plugin_versions.versions}",
]
Expand Down
5 changes: 5 additions & 0 deletions gradle/jmh.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Java microbenchmark harness: https://github.com/melix/jmh-gradle-plugin
*/
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'me.champeau.gradle.jmh'
apply plugin: 'eclipse'
apply plugin: 'idea'
Expand Down Expand Up @@ -28,6 +29,10 @@ tasks.jmh {
description = 'Executes a Java microbenchmark'
}

jmhJar {
mergeServiceFiles()
}

jmh {
jmhVersion = '1.11'

Expand Down

0 comments on commit bb7a42c

Please sign in to comment.