Files
perfdb/build.gradle
Andreas Huber 162ef1626c reduce memory usage for computation of cumulative distribution
Before: To compute the cumulative distribution we added every duration
into a LongList. This requires O(n) memory, where n is the number of
values.

Now: We store the durations + the number of occurrences in a
LongLongHashMap. This has the potential to reduce the memory
requirements if durations occur multiple times. There are a lot of
durations with 0, 1, 2 milliseconds. In the worst case every duration
is different. In that case the memory usage doubled with this solution.

Future: We are currently storing durations with milli seconds precision.
We don't have to do that. We cannot draw 100 million different values
on the y-axis in an images with only 1000px.
2019-09-07 18:31:18 +02:00

125 lines
3.7 KiB
Groovy

import org.gradle.plugins.ide.eclipse.model.AccessRule
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'com.github.ben-manes.versions'
buildscript {
repositories {
jcenter()
}
dependencies {
// usage: gradlew dependencyUpdates -Drevision=release
classpath 'com.github.ben-manes:gradle-versions-plugin:0.22.0'
}
}
ext {
version_log4j2= '2.12.1'
version_spring = '2.1.7.RELEASE'
lib_antlr = "org.antlr:antlr4:4.7.2"
lib_commons_collections4 = 'org.apache.commons:commons-collections4:4.4'
lib_commons_lang3 = 'org.apache.commons:commons-lang3:3.9'
lib_jackson_databind = 'com.fasterxml.jackson.core:jackson-databind:2.9.9.1'
lib_log4j2_api = "org.apache.logging.log4j:log4j-api:${version_log4j2}"
lib_log4j2_core = "org.apache.logging.log4j:log4j-core:${version_log4j2}"
lib_log4j2_slf4j_impl = "org.apache.logging.log4j:log4j-slf4j-impl:${version_log4j2}"
lib_primitive_collections='org.lucares:primitiveCollections:0.1.20190907180014'
lib_spring_boot_log4j2="org.springframework.boot:spring-boot-starter-log4j2:${version_spring}"
lib_spring_boot_mustache="org.springframework.boot:spring-boot-starter-mustache:${version_spring}"
lib_spring_boot_test="org.springframework.boot:spring-boot-starter-test:${version_spring}"
lib_spring_boot_web="org.springframework.boot:spring-boot-starter-web:${version_spring}"
eclipseAccessRestrictions = [
'org.eclipse.jdt.launching.JRE_CONTAINER': [
new AccessRule('nonaccessible', 'com/sun/**'),
new AccessRule('nonaccessible', 'java/awt/List'),
new AccessRule('nonaccessible', 'sun/**'),
],
'assertj-core': [
new AccessRule('nonaccessible', 'org/assertj/core/internal/**'),
new AccessRule('nonaccessible', 'org/assertj/core/util/Arrays')
]
]
}
/*
* The shared configuration for all sub-projects:
*/
subprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
// java compatibility version
sourceCompatibility = 12
configurations {
tests
}
// the repositories for external depenencies
repositories {
maven {
url 'https://repo.lucares.de/'
content { includeGroup "org.lucares" }
}
mavenCentral(content: { excludeGroup "org.lucares" })
jcenter{
content { excludeGroup "org.lucares" }
}
}
// In this example we use TestNG as our testing tool. JUnit is the default.
test{
useTestNG()
//testLogging.showStandardStreams = true
}
// dependencies that all sub-projects have
dependencies {
testCompile group: 'org.testng', name: 'testng', version: '6.14.3'
}
eclipse {
classpath {
file {
whenMerged {
eclipseAccessRestrictions.each{ path, restrictions ->
def container = entries.find { it.path.contains path }
if (container != null) {
container.accessRules.addAll(restrictions)
}
}
}
}
}
}
}
allprojects {
compileJava.options.encoding = 'UTF-8'
task eclipseSettings(type: Copy) {
from ("${rootProject.projectDir}/eclipse/") {
include '**/*.prefs'
//filter(ReplaceTokens, tokens: [rootProjectDir: "${rootProject.projectDir}".toString().replaceAll('\\\\', '/')])
}
into "${project.projectDir}/.settings/"
}
tasks.eclipseJdt.dependsOn eclipseSettings
tasks.cleanEclipseJdt.dependsOn cleanEclipseSettings
}
wrapper {
gradleVersion = '5.6'
}