mirror of
https://github.com/xerial/snappy-java.git
synced 2025-05-03 06:20:22 +02:00
Use airframe-log for Scala 2.12
This commit is contained in:
parent
1695a7f365
commit
5427c222a1
3
.scalafmt.conf
Normal file
3
.scalafmt.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
maxColumn = 180
|
||||||
|
style = defaultWithAlign
|
||||||
|
optIn.breaksInsideChains = true
|
@ -80,10 +80,10 @@ libraryDependencies ++= Seq(
|
|||||||
"junit" % "junit" % "4.8.2" % "test",
|
"junit" % "junit" % "4.8.2" % "test",
|
||||||
"org.codehaus.plexus" % "plexus-classworlds" % "2.4" % "test",
|
"org.codehaus.plexus" % "plexus-classworlds" % "2.4" % "test",
|
||||||
"org.xerial.java" % "xerial-core" % "2.1" % "test",
|
"org.xerial.java" % "xerial-core" % "2.1" % "test",
|
||||||
"org.xerial" % "xerial-core" % "3.2.3" % "test",
|
"org.wvlet.airframe" %% "airframe-log" % "0.25" % "test",
|
||||||
"org.scalatest" % "scalatest_2.11" % "2.2.0" % "test",
|
"org.scalatest" %% "scalatest" % "3.0.4" % "test",
|
||||||
"org.osgi" % "org.osgi.core" % "4.3.0" % "provided",
|
"org.osgi" % "org.osgi.core" % "4.3.0" % "provided",
|
||||||
"com.novocode" % "junit-interface" % "0.10" % "test"
|
"com.novocode" % "junit-interface" % "0.11" % "test"
|
||||||
)
|
)
|
||||||
|
|
||||||
enablePlugins(SbtOsgi)
|
enablePlugins(SbtOsgi)
|
||||||
|
@ -2,8 +2,6 @@ package org.xerial.snappy
|
|||||||
|
|
||||||
import java.io.{ByteArrayOutputStream, ByteArrayInputStream}
|
import java.io.{ByteArrayOutputStream, ByteArrayInputStream}
|
||||||
|
|
||||||
import xerial.core.log.LogLevel
|
|
||||||
|
|
||||||
import scala.util.Random
|
import scala.util.Random
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,7 +24,7 @@ class SnappyPerformanceTest extends SnappySpec {
|
|||||||
|
|
||||||
val input = data
|
val input = data
|
||||||
|
|
||||||
time("compression", repeat = 100, logLevel = LogLevel.INFO) {
|
time("compression", repeat = 100) {
|
||||||
// 0.037 sec. => 0.026
|
// 0.037 sec. => 0.026
|
||||||
block("default") {
|
block("default") {
|
||||||
val out = new ByteArrayOutputStream()
|
val out = new ByteArrayOutputStream()
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
package org.xerial.snappy
|
package org.xerial.snappy
|
||||||
|
|
||||||
import org.scalatest._
|
import org.scalatest._
|
||||||
import xerial.core.log.Logger
|
import wvlet.log.LogFormatter.SourceCodeLogFormatter
|
||||||
import xerial.core.util.Timer
|
import wvlet.log.{LogSupport, Logger}
|
||||||
|
import wvlet.log.io.Timer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
trait SnappySpec extends WordSpec with Matchers with GivenWhenThen with OptionValues with BeforeAndAfter with Timer with Logger {
|
trait SnappySpec extends WordSpec with Matchers with GivenWhenThen with OptionValues with BeforeAndAfter with Timer with LogSupport {
|
||||||
|
Logger.setDefaultFormatter(SourceCodeLogFormatter)
|
||||||
|
|
||||||
implicit def toTag(s: String): Tag = Tag(s)
|
implicit def toTag(s: String): Tag = Tag(s)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user