Remove data point calucations for now
This commit is contained in:
@@ -263,20 +263,20 @@ struct StatsController: RouteCollection {
|
||||
// print ( Date().timeIntervalSince(startTime))
|
||||
|
||||
|
||||
let cumulativeWinLossRatios = self.getCumulativeWinLossRatios(matches: matches)
|
||||
// let cumulativeWinLossRatios = self.getCumulativeWinLossRatios(matches: matches)
|
||||
|
||||
// print ( Date().timeIntervalSince(startTime))
|
||||
|
||||
let highestWinLossRatio = cumulativeWinLossRatios.reduce("0") { (highestRatio, dataPoint) -> String in
|
||||
if dataPoint.y > Double(highestRatio)!{
|
||||
return String(dataPoint.y)
|
||||
}
|
||||
return highestRatio
|
||||
}
|
||||
// let highestWinLossRatio = cumulativeWinLossRatios.reduce("0") { (highestRatio, dataPoint) -> String in
|
||||
// if dataPoint.y > Double(highestRatio)!{
|
||||
// return String(dataPoint.y)
|
||||
// }
|
||||
// return highestRatio
|
||||
// }
|
||||
// print ( Date().timeIntervalSince(startTime))
|
||||
|
||||
|
||||
return AllStats.init(overall: overallStats,mwStats: mwStats, bocwStats: bocwStats, byMonth: monthlyStats, highestWinLossRatio: highestWinLossRatio, dataPoints: cumulativeWinLossRatios, mostRecentRecord: "\(mostRecentDailyStats.totalWins) - \(mostRecentDailyStats.totalLosses)")
|
||||
return AllStats.init(overall: overallStats,mwStats: mwStats, bocwStats: bocwStats, byMonth: monthlyStats, mostRecentRecord: "\(mostRecentDailyStats.totalWins) - \(mostRecentDailyStats.totalLosses)")
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user