refactor
This commit is contained in:
19
benchmark/build.gradle
Normal file
19
benchmark/build.gradle
Normal file
@@ -0,0 +1,19 @@
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm'
|
||||
id 'application'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation group: 'net.woggioni', name: 'jwo', version: getProperty('version.jwo')
|
||||
implementation(rootProject)
|
||||
// runtime(files(rootProject.projectDir.toPath().resolve("src/test/resources")))
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
||||
application {
|
||||
mainClassName = "net.woggioni.klevtree.benchmark.BenchmarkKt"
|
||||
}
|
@@ -1,28 +0,0 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
application
|
||||
}
|
||||
|
||||
group = "woggioni.net"
|
||||
version = "0.1"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
compile(rootProject)
|
||||
// runtime(files(rootProject.projectDir.toPath().resolve("src/test/resources")))
|
||||
}
|
||||
|
||||
application {
|
||||
mainClassName = "net.woggioni.klevtree.benchmark.BenchmarkKt"
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
@@ -1 +0,0 @@
|
||||
rootProject.name = "klevtree-benchmark"
|
@@ -1,14 +1,11 @@
|
||||
package net.woggioni.klevtree.benchmark
|
||||
|
||||
import net.woggioni.klevtree.ILevTrie
|
||||
import net.woggioni.klevtree.LevTrie
|
||||
import java.io.BufferedReader
|
||||
import java.io.InputStreamReader
|
||||
import net.woggioni.jwo.Chronometer
|
||||
|
||||
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
fun main() {
|
||||
val reader = BufferedReader(
|
||||
InputStreamReader(Chronometer::class.java.getResourceAsStream("/cracklib-small"))
|
||||
)
|
||||
@@ -21,7 +18,7 @@ fun main(args: Array<String>) {
|
||||
} finally {
|
||||
reader.close()
|
||||
}
|
||||
tree.algorithm = ILevTrie.Algorithm.DAMERAU_LEVENSHTEIN
|
||||
tree.algorithm = LevTrie.Algorithm.DAMERAU_LEVENSHTEIN
|
||||
tree.caseSensitive = false
|
||||
val chr = Chronometer()
|
||||
val keys = arrayOf("camel", "coriolis", "mattel", "cruzer", "cpoper", "roublesoot")
|
Reference in New Issue
Block a user