diff options
author | Rocky Madden <git@rockymadden.com> | 2013-03-07 11:05:07 -0700 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-03-07 11:05:07 -0700 |
commit | 315422887d00e333a9f113fc16089c4e8468ca61 (patch) | |
tree | a968acda871b294e9103fd3b96be1959650a8f8b /core/source/benchmark/scala/com/rockymadden | |
parent | 6f0fb01f454a70468b9db560879dadc46e71e228 (diff) | |
download | stringmetric-315422887d00e333a9f113fc16089c4e8468ca61.tar.gz stringmetric-315422887d00e333a9f113fc16089c4e8468ca61.tar.bz2 stringmetric-315422887d00e333a9f113fc16089c4e8468ca61.zip |
Favored dependency injection.
Diffstat (limited to 'core/source/benchmark/scala/com/rockymadden')
19 files changed, 39 insertions, 39 deletions
diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithmBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithmBenchmark.scala index c8c22e8..7af1a2c 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithmBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneAlgorithmBenchmark.scala @@ -5,7 +5,7 @@ import com.rockymadden.stringmetric.{ CaliperBenchmark, CaliperRunner } import scala.util.Random final class MetaphoneAlgorithmBenchmark extends CaliperBenchmark { - import MetaphoneAlgorithmBenchmark._ + import MetaphoneAlgorithmBenchmark.Algorithm @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -28,5 +28,5 @@ final class MetaphoneAlgorithmBenchmark extends CaliperBenchmark { } object MetaphoneAlgorithmBenchmark extends CaliperRunner(classOf[MetaphoneAlgorithmBenchmark]) { - private final val Algorithm = new MetaphoneAlgorithm + private final val Algorithm = MetaphoneAlgorithm() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneMetricBenchmark.scala index 73a9b4f..34e77b3 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/MetaphoneMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class MetaphoneMetricBenchmark extends CaliperBenchmark { - import MetaphoneMetricBenchmark._ + import MetaphoneMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class MetaphoneMetricBenchmark extends CaliperBenchmark { } object MetaphoneMetricBenchmark extends CaliperRunner(classOf[MetaphoneMetricBenchmark]) { - private final val Metric = new MetaphoneMetric + private final val Metric = MetaphoneMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisAlgorithmBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisAlgorithmBenchmark.scala index 9680c77..97f88ed 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisAlgorithmBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisAlgorithmBenchmark.scala @@ -1,11 +1,11 @@ package com.rockymadden.stringmetric.phonetic import com.google.caliper.Param -import com.rockymadden.stringmetric.{ CaliperBenchmark, CaliperRunner } +import com.rockymadden.stringmetric.{ CaliperBenchmark, CaliperRunner, StringFilter } import scala.util.Random final class NysiisAlgorithmBenchmark extends CaliperBenchmark { - import NysiisAlgorithmBenchmark._ + import NysiisAlgorithmBenchmark.Algorithm @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -28,5 +28,5 @@ final class NysiisAlgorithmBenchmark extends CaliperBenchmark { } object NysiisAlgorithmBenchmark extends CaliperRunner(classOf[NysiisAlgorithmBenchmark]) { - private final val Algorithm = new NysiisAlgorithm + private final val Algorithm = NysiisAlgorithm() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisMetricBenchmark.scala index 5be6ef8..0af61c1 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/NysiisMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class NysiisMetricBenchmark extends CaliperBenchmark { - import NysiisMetricBenchmark._ + import NysiisMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class NysiisMetricBenchmark extends CaliperBenchmark { } object NysiisMetricBenchmark extends CaliperRunner(classOf[NysiisMetricBenchmark]) { - private final val Metric = new NysiisMetric + private final val Metric = NysiisMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisAlgorithmBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisAlgorithmBenchmark.scala index 95fd775..65d9d8f 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisAlgorithmBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisAlgorithmBenchmark.scala @@ -5,7 +5,7 @@ import com.rockymadden.stringmetric.{ CaliperBenchmark, CaliperRunner } import scala.util.Random final class RefinedNysiisAlgorithmBenchmark extends CaliperBenchmark { - import RefinedNysiisAlgorithmBenchmark._ + import RefinedNysiisAlgorithmBenchmark.Algorithm @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -28,5 +28,5 @@ final class RefinedNysiisAlgorithmBenchmark extends CaliperBenchmark { } object RefinedNysiisAlgorithmBenchmark extends CaliperRunner(classOf[RefinedNysiisAlgorithmBenchmark]) { - private final val Algorithm = new RefinedNysiisAlgorithm + private final val Algorithm = RefinedNysiisAlgorithm() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisMetricBenchmark.scala index 8a9e208..b7d8c93 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedNysiisMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class RefinedNysiisMetricBenchmark extends CaliperBenchmark { - import RefinedNysiisMetricBenchmark._ + import RefinedNysiisMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class RefinedNysiisMetricBenchmark extends CaliperBenchmark { } object RefinedNysiisMetricBenchmark extends CaliperRunner(classOf[RefinedNysiisMetricBenchmark]) { - private final val Metric = new RefinedNysiisMetric + private final val Metric = RefinedNysiisMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexAlgorithmBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexAlgorithmBenchmark.scala index cbb5d10..e2f58d3 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexAlgorithmBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexAlgorithmBenchmark.scala @@ -5,7 +5,7 @@ import com.rockymadden.stringmetric.{ CaliperBenchmark, CaliperRunner } import scala.util.Random final class RefinedSoundexAlgorithmBenchmark extends CaliperBenchmark { - import RefinedSoundexAlgorithmBenchmark._ + import RefinedSoundexAlgorithmBenchmark.Algorithm @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -28,5 +28,5 @@ final class RefinedSoundexAlgorithmBenchmark extends CaliperBenchmark { } object RefinedSoundexAlgorithmBenchmark extends CaliperRunner(classOf[RefinedSoundexAlgorithmBenchmark]) { - private final val Algorithm = new RefinedSoundexAlgorithm + private final val Algorithm = RefinedSoundexAlgorithm() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala index 9ccaf95..71a2485 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class RefinedSoundexMetricBenchmark extends CaliperBenchmark { - import RefinedSoundexMetricBenchmark._ + import RefinedSoundexMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class RefinedSoundexMetricBenchmark extends CaliperBenchmark { } object RefinedSoundexMetricBenchmark extends CaliperRunner(classOf[RefinedSoundexMetricBenchmark]) { - private final val Metric = new RefinedSoundexMetric + private final val Metric = RefinedSoundexMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexAlgorithmBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexAlgorithmBenchmark.scala index 91dad8f..8f5fd83 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexAlgorithmBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexAlgorithmBenchmark.scala @@ -5,7 +5,7 @@ import com.rockymadden.stringmetric.{ CaliperBenchmark, CaliperRunner } import scala.util.Random final class SoundexAlgorithmBenchmark extends CaliperBenchmark { - import SoundexAlgorithmBenchmark._ + import SoundexAlgorithmBenchmark.Algorithm @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -28,5 +28,5 @@ final class SoundexAlgorithmBenchmark extends CaliperBenchmark { } object SoundexAlgorithmBenchmark extends CaliperRunner(classOf[SoundexAlgorithmBenchmark]) { - private final val Algorithm = new SoundexAlgorithm + private final val Algorithm = SoundexAlgorithm() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexMetricBenchmark.scala index df2828f..7d20a24 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/SoundexMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class SoundexMetricBenchmark extends CaliperBenchmark { - import SoundexMetricBenchmark._ + import SoundexMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class SoundexMetricBenchmark extends CaliperBenchmark { } object SoundexMetricBenchmark extends CaliperRunner(classOf[SoundexMetricBenchmark]) { - private final val Metric = new SoundexMetric + private final val Metric = SoundexMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/DiceSorensenMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/DiceSorensenMetricBenchmark.scala index 8f4a90e..6561b97 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/DiceSorensenMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/DiceSorensenMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class DiceSorensenMetricBenchmark extends CaliperBenchmark { - import DiceSorensenMetricBenchmark._ + import DiceSorensenMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class DiceSorensenMetricBenchmark extends CaliperBenchmark { } object DiceSorensenMetricBenchmark extends CaliperRunner(classOf[DiceSorensenMetricBenchmark]) { - private final val Metric = new DiceSorensenMetric + private final val Metric = DiceSorensenMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/HammingMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/HammingMetricBenchmark.scala index 660ac88..1e9b7db 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/HammingMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/HammingMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class HammingMetricBenchmark extends CaliperBenchmark { - import HammingMetricBenchmark._ + import HammingMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class HammingMetricBenchmark extends CaliperBenchmark { } object HammingMetricBenchmark extends CaliperRunner(classOf[HammingMetricBenchmark]) { - private final val Metric = new HammingMetric + private final val Metric = HammingMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroMetricBenchmark.scala index b2da3dc..d43d594 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class JaroMetricBenchmark extends CaliperBenchmark { - import JaroMetricBenchmark._ + import JaroMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class JaroMetricBenchmark extends CaliperBenchmark { } object JaroMetricBenchmark extends CaliperRunner(classOf[JaroMetricBenchmark]) { - private final val Metric = new JaroMetric + private final val Metric = JaroMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroWinklerMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroWinklerMetricBenchmark.scala index e85597a..dab240a 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroWinklerMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/JaroWinklerMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class JaroWinklerMetricBenchmark extends CaliperBenchmark { - import JaroWinklerMetricBenchmark._ + import JaroWinklerMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class JaroWinklerMetricBenchmark extends CaliperBenchmark { } object JaroWinklerMetricBenchmark extends CaliperRunner(classOf[JaroWinklerMetricBenchmark]) { - private final val Metric = new JaroWinklerMetric + private final val Metric = JaroWinklerMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/LevenshteinMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/LevenshteinMetricBenchmark.scala index 01c6a6c..3f0fe55 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/LevenshteinMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/LevenshteinMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class LevenshteinMetricBenchmark extends CaliperBenchmark { - import LevenshteinMetricBenchmark._ + import LevenshteinMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class LevenshteinMetricBenchmark extends CaliperBenchmark { } object LevenshteinMetricBenchmark extends CaliperRunner(classOf[LevenshteinMetricBenchmark]) { - private final val Metric = new LevenshteinMetric + private final val Metric = LevenshteinMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramAlgorithmBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramAlgorithmBenchmark.scala index 0b8f718..ae34220 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramAlgorithmBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramAlgorithmBenchmark.scala @@ -5,7 +5,7 @@ import com.rockymadden.stringmetric.{ CaliperBenchmark, CaliperRunner } import scala.util.Random final class NGramAlgorithmBenchmark extends CaliperBenchmark { - import NGramAlgorithmBenchmark._ + import NGramAlgorithmBenchmark.Algorithm @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -31,5 +31,5 @@ final class NGramAlgorithmBenchmark extends CaliperBenchmark { } object NGramAlgorithmBenchmark extends CaliperRunner(classOf[NGramAlgorithmBenchmark]) { - private final val Algorithm = new NGramAlgorithm + private final val Algorithm = NGramAlgorithm() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramMetricBenchmark.scala index 4829b22..1ded58b 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/NGramMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class NGramMetricBenchmark extends CaliperBenchmark { - import NGramMetricBenchmark._ + import NGramMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -54,5 +54,5 @@ final class NGramMetricBenchmark extends CaliperBenchmark { } object NGramMetricBenchmark extends CaliperRunner(classOf[NGramMetricBenchmark]) { - private final val Metric = new NGramMetric + private final val Metric = NGramMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/RatcliffObershelpMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/RatcliffObershelpMetricBenchmark.scala index 6050cc7..f89ba22 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/RatcliffObershelpMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/RatcliffObershelpMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class RatcliffObershelpMetricBenchmark extends CaliperBenchmark { - import RatcliffObershelpMetricBenchmark._ + import RatcliffObershelpMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class RatcliffObershelpMetricBenchmark extends CaliperBenchmark { } object RatcliffObershelpMetricBenchmark extends CaliperRunner(classOf[RatcliffObershelpMetricBenchmark]) { - private final val Metric = new RatcliffObershelpMetric + private final val Metric = RatcliffObershelpMetric() } diff --git a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala index a5424a2..35726bf 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/similarity/WeightedLevenshteinMetricBenchmark.scala @@ -6,7 +6,7 @@ import scala.annotation.tailrec import scala.util.Random final class WeightedLevenshteinMetricBenchmark extends CaliperBenchmark { - import WeightedLevenshteinMetricBenchmark._ + import WeightedLevenshteinMetricBenchmark.Metric @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -51,5 +51,5 @@ final class WeightedLevenshteinMetricBenchmark extends CaliperBenchmark { } object WeightedLevenshteinMetricBenchmark extends CaliperRunner(classOf[WeightedLevenshteinMetricBenchmark]) { - private final val Metric = new WeightedLevenshteinMetric + private final val Metric = WeightedLevenshteinMetric() } |