Skip to content

Commit

Permalink
with debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesward committed Feb 20, 2024
1 parent d0f2a6f commit 668a213
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions scala-ce3/src/main/scala/EasyRacerClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -178,26 +178,10 @@ object EasyRacerClient extends IOApp.Simple {
reqRes.raceSuccess(reqRes)
}

/*
def scenario9(client: Client[IO], scenarioUrl: Int => Uri) = {
val req = for
resp <- Client.request(scenarioUrl(9)).filterOrFail(_.status.isSuccess)(Error())
body <- resp.body.asString
now <- Clock.nanoTime
yield
now -> body
ZIO.withParallelism(10) {
ZIO.collectAllSuccessesPar(Seq.fill(10)(req)).map { resp =>
resp.sortBy(_._1).map(_._2).mkString
}
}
}
*/

def scenario9(client: Client[IO], scenarioUrl: Int => Uri) = {
val req = for {
body <- client.expect[String](scenarioUrl(9))
_ = println(body)
now <- Clock[IO].realTimeInstant
} yield
now -> body
Expand Down

0 comments on commit 668a213

Please sign in to comment.