Skip to content

Commit

Permalink
Revert "#112 Metrics for RateLimiter (#119)"
Browse files Browse the repository at this point in the history
This reverts commit 4d38b43.
  • Loading branch information
svroonland committed May 24, 2021
1 parent 3b53426 commit 3f6e184
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 318 deletions.
8 changes: 1 addition & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,7 @@ lazy val root = project

lazy val rezilience = crossProject(JSPlatform, JVMPlatform)
.in(file("rezilience"))
.jvmSettings(
commonJvmSettings ++ Seq(
libraryDependencies ++= Seq(
"org.hdrhistogram" % "HdrHistogram" % "2.1.12"
)
)
)
.jvmSettings(commonJvmSettings)
.jsSettings(commonJsSettings)
.settings(
name := "rezilience",
Expand Down
25 changes: 0 additions & 25 deletions docs/docs/docs/metrics.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ trait RateLimiter { self =>
}
}

object RateLimiter extends RateLimiterPlatformSpecificObj {
object RateLimiter {

/**
* Creates a RateLimiter as Managed resource
Expand All @@ -53,7 +53,7 @@ object RateLimiter extends RateLimiterPlatformSpecificObj {
.bounded[(Ref[Boolean], UIO[Any])](zio.internal.RingBuffer.nextPow2(max))
.toManaged_ // Power of two because it is a more efficient queue implementation
_ <- ZStream
.fromQueue(q, 1) // Until https://github.com/zio/zio/issues/4190 is fixed
.fromQueue(q, maxChunkSize = max)
.filterM { case (interrupted, effect @ _) => interrupted.get.map(!_) }
.throttleShape(max.toLong, interval, max.toLong)(_.size.toLong)
.mapMParUnordered(Int.MaxValue) { case (interrupted @ _, effect) => effect }
Expand Down

0 comments on commit 3f6e184

Please sign in to comment.