diff options
Diffstat (limited to 'core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala')
-rwxr-xr-x | core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala | 14 |
1 files changed, 4 insertions, 10 deletions
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 8e24650..6c52e8d 100755 --- a/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala +++ b/core/source/benchmark/scala/com/rockymadden/stringmetric/phonetic/RefinedSoundexMetricBenchmark.scala @@ -6,8 +6,6 @@ import scala.annotation.tailrec import scala.util.Random final class RefinedSoundexMetricBenchmark extends CaliperBenchmark { - import RefinedSoundexMetricBenchmark.Metric - @Param(Array("0", "1", "2", "4", "8", "16")) var length: Int = _ @@ -34,22 +32,18 @@ final class RefinedSoundexMetricBenchmark extends CaliperBenchmark { } def timeCompareWithDifferentCharArrays(reps: Int) = run(reps) { - Metric.compare(charArray1, charArray2) + RefinedSoundexMetric.compare(charArray1, charArray2) } def timeCompareWithDifferentStrings(reps: Int) = run(reps) { - Metric.compare(string1, string2) + RefinedSoundexMetric.compare(string1, string2) } def timeCompareWithIdenticalCharArrays(reps: Int) = run(reps) { - Metric.compare(charArray1, charArray1) + RefinedSoundexMetric.compare(charArray1, charArray1) } def timeCompareWithIdenticalStrings(reps: Int) = run(reps) { - Metric.compare(string1, string1) + RefinedSoundexMetric.compare(string1, string1) } } - -object RefinedSoundexMetricBenchmark extends CaliperRunner(classOf[RefinedSoundexMetricBenchmark]) { - private final val Metric = RefinedSoundexMetric() -} |