Skip to content

Commit

Permalink
Revert syntax changes
Browse files Browse the repository at this point in the history
  • Loading branch information
WarpWing authored Apr 20, 2024
1 parent 311d647 commit 9450af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/Lag.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ final class Lag(lilaRedis: Lila, groupedWithin: util.GroupedWithin):

export trustedStats.getIfPresent as sessionLag

private val clientReports = groupedWithin[(User.Id, Int)](256, 947.millis) { lags =>
private val clientReports = groupedWithin[(User.Id, Int)](256, 947.millis): lags =>
lilaRedis.emit.site(LilaIn.Lags(lags.toMap))
}

export clientReports.apply as recordClientLag

def recordTrustedLag(millis: Int, userId: Option[User.Id], domain: Domain) =
Monitor.lag.roundFrameLag(millis, domain)
userId.foreach { uid =>
userId.foreach: uid =>
trustedStats.put(
uid,
sessionLag(uid).fold(millis) { prev =>
Expand Down

0 comments on commit 9450af1

Please sign in to comment.