Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuwalow committed May 30, 2024
1 parent 5db701f commit 3acc85c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ The library focuses exclusively on cpu profiling. For heap profiling please cons
ZIO Profiling requires you to add both the main library and optionally the compiler plugin to your build.sbt:

```scala
libraryDependencies += "dev.zio" %% "zio-profiling" % "0.3.0"
libraryDependencies += compilerPlugin("dev.zio" %% "zio-profiling-tagging-plugin" % "0.3.0")
libraryDependencies += "dev.zio" %% "zio-profiling" % "0.3.1"
libraryDependencies += compilerPlugin("dev.zio" %% "zio-profiling-tagging-plugin" % "0.3.1")
```

## Profiling an application and displaying a flamegraph
Expand Down Expand Up @@ -131,15 +131,15 @@ val testEffect = CostCenter.withChildCostCenter("foo.Foo.testEffect(Foo.scala:12
To enable the compiler plugin, add the following to the sbt module __containing the code you want to profile__.

```scala
compilerPlugin("dev.zio" %% "zio-profiling-tagging-plugin" % "0.3.0")
compilerPlugin("dev.zio" %% "zio-profiling-tagging-plugin" % "0.3.1")

```

## Jmh Support

ZIO Profiling offers an integration with the Java Microbenchmark Harness (JMH). In order to profile a jmh benchmark, first ensure that the sources are properly tagged using the tagging plugin. Next, add a dependency to the jmh module to your benchmarking module:
```scala
libraryDependencies += "dev.zio" %% "zio-profiling-jmh" % "0.3.0"
libraryDependencies += "dev.zio" %% "zio-profiling-jmh" % "0.3.1"
```

In your actual benchmarks, ensure that you are running ZIO effects using the methods in `zio.profiling.jmh.BenchmarkUtils`. A possible benchmark might look like this
Expand Down

0 comments on commit 3acc85c

Please sign in to comment.