Skip to content

Commit

Permalink
Update README.md (#226)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Aug 9, 2023
1 parent 4e56f45 commit f3c164c
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.2.0"
libraryDependencies += compilerPlugin("dev.zio" %% "zio-profiling-tagging-plugin" % "0.2.0")
libraryDependencies += "dev.zio" %% "zio-profiling" % "0.2.1"
libraryDependencies += compilerPlugin("dev.zio" %% "zio-profiling-tagging-plugin" % "0.2.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.2.0")
compilerPlugin("dev.zio" %% "zio-profiling-tagging-plugin" % "0.2.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.2.0"
libraryDependencies += "dev.zio" %% "zio-profiling-jmh" % "0.2.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 f3c164c

Please sign in to comment.