Packages

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
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CsvBench
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CsvBench()

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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.

  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. implicit val executionContext: ExecutionContextExecutor
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. implicit val mat: ActorMaterializer
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def parse(bh: Blackhole): Unit
    Annotations
    @Benchmark()
  18. def setup(): Unit
    Annotations
    @Setup()
  19. var source: Source[ByteString, NotUsed]
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. implicit val system: ActorSystem
  22. def tearDown(): Unit
    Annotations
    @TearDown()
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped