log slow ranking computation

pull/9923/head
Thibault Duplessis 2021-10-03 09:34:31 +02:00
parent 91980cb4da
commit 1fd57bc4da
1 changed files with 4 additions and 1 deletions

View File

@ -122,9 +122,12 @@ final class RankingApi(
.buildAsyncFuture { _ =>
lila.common.Future
.linear(PerfType.leaderboardable) { pt =>
compute(pt) dmap (pt -> _)
compute(pt).dmap(pt -> _)
}
.dmap(_.toMap)
.chronometer
.logIfSlow(500, logger.branch("ranking"))(_ => "slow weeklyStableRanking")
.result
}
}