class CsvBench extends AnyRef
Measures the time to parse a 1 MB CSV file, consuming the first field of each row.
Using Oracle Flight Recorder
To record a Flight Recorder file from a JMH run, run it using the jmh.extras.JFR profiler: > csv-bench/jmh:run -prof jmh.extras.JFR -t1 -f1 -wi 5 -i 10 .*CsvBench
This will result in flight recording file which you can open and analyze offline using JMC. Start with "jmc" from a terminal.
Sample benchmark results
Your results may differ. Rerun these on YOUR OWN MACHINE before/after making changes.
> csv-bench/jmh:run -t1 -f1 -wi 10 -i 10 .*CsvBench [info] Benchmark (bsSize) Mode Cnt Score Error Units [info] CsvBench.parse 32 thrpt 10 78.424 ± 1.351 ops/s [info] CsvBench.parse 1024 thrpt 10 158.948 ± 3.187 ops/s [info] CsvBench.parse 8192 thrpt 10 167.617 ± 2.759 ops/s [info] CsvBench.parse 65536 thrpt 10 170.670 ± 2.462 ops/s
- Annotations
- @Warmup() @Measurement() @BenchmarkMode() @Fork() @State()
- Source
- CsvBench.scala
- See also
https://github.com/ktoso/sbt-jmh
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- CsvBench
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new CsvBench()
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
var
bsSize: Int
Size of ByteString chunks in bytes.
Size of ByteString chunks in bytes.
Total message size remains the same. This just determines how big the chunks are.
WSClient returns a Source[ByteString, _] in 8k chunks.
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- implicit val executionContext: ExecutionContextExecutor
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- implicit val mat: ActorMaterializer
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
parse(bh: Blackhole): Unit
- Annotations
- @Benchmark()
-
def
setup(): Unit
- Annotations
- @Setup()
- var source: Source[ByteString, NotUsed]
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- implicit val system: ActorSystem
-
def
tearDown(): Unit
- Annotations
- @TearDown()
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )