def localHealthCheck()

in src/main/scala/com/twitter/iago/launcher/LocalMode.scala [137:154]


  def localHealthCheck(serverFlags: Seq[Flag[_]], feederFlags: Seq[Flag[_]]) = {
    val iagoServerClient = Http.newService(s"localhost:${serverAdminPort()}")
    val iagoFeederClient = Http.newService(s"localhost:${feederAdminPort()}")

    val healthCheckDuration = healthCheckDurationF()
    val healthCheckDeadline = healthCheckDuration.fromNow

    while (Time.now < healthCheckDeadline) {
      checkJvmUptime(iagoServerClient, iagoFeederClient)
      log.info(
        s"Metric jvm/uptime looks healthy for both Iago server and feeder. ${healthCheckDeadline - Time.now} left..."
      )
      // Todo: add health checks for other metrics. e.g. gc, success rate, request rate, queue depth etc.
      Thread.sleep(2000L)
    }

    log.info("Finished. Health check pass. This load test is running healthily.")
  }