Closed cishiv closed 1 month ago
@cishiv is attempting to deploy a commit to the erin-fitzpatric's projects Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
aom-gg | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 25, 2024 4:50pm |
This looks really good, I think play rate might be bugged though?
This looks really good, I think play rate might be bugged though?
Ah good catch, will take a look after work tomorrow.
Thanks for adding the builds and game_modes routes. I'm ok with it since there is a cache. I am slightly concerned about how well this will scale - we will eventually have 1 million + matches. Does it really make sense to scan this whole collection to find a game mode?
Fair callout on the scalability - I think at 1M+ matches we'd probably want indexes on a couple of the fields (like profile_id) which would reduce the search space for distinct. We could also just use the hard coded match types tbh - it's not that much of a UX loss.
Looking forward to getting this out there! Let me know once you have made the above updates and I'll merge it in. Have a few other pressing front end stories I could use help with too if you want to dig into the stats pages 👀
@erin-fitzpatric looked into the play rate issue.
It's technically not a bug. If you filter by a single god, the returned data will give you the play rate of that god out of all the results (which in this case, is just that god). Do you want it to be an absolute play rate? Would be a small change (e.g. if you filter by a specific god, give the play rate for that god out of all the gods). Just want to confirm if thats the behaviour you want.
@erin-fitzpatric looked into the play rate issue.
It's technically not a bug. If you filter by a single god, the returned data will give you the play rate of that god out of all the results (which in this case, is just that god). Do you want it to be an absolute play rate? Would be a small change (e.g. if you filter by a specific god, give the play rate for that god out of all the gods). Just want to confirm if thats the behaviour you want.
Ya I don't think it is useful to have 100% showing for every god. I would expect it to be the percentage I have played that civ compared to other picks.
Okay cool - good sanity check. I've pushed the updated code.
No filters:
Filter by god:
I'll do a performance tuning pass if I make more changes to this code in different PRs.
This looks awesome, thanks for your work! I was going to go ahead and merge this if you feel good about it.
Would be awesome to get some timeline graphs for player elo over time and other stuff like that if you would be interested. I also need some major help in the stats sections. I have greyed out options for "map" and "matchup" stats that I would like to get out there.
Changes:
/api/data/builds
and/api/data/game_modes
(avoids us having to maintain hard-coded values, and has the upshot of having thegame_modes
list used in the filter only includegame_modes
that have been played) - added cache control headers to this so we don't overfetch on each page reload./api/stats/users/gods
+ servicemajorGodNameToIndex
functionplayerGodStats.tsx
componentHow it works:
Matches
collection and Mongo filters to pull back the appropriate Match info (all matches for a provided profileId, with some combination of civ, patch and major god) - we then manipulate the returned data to get w/l and play rates, combined across game modes.profile.tsx
(like the other components), it looked pretty monolithic already.How it looks:
Extensions:
Closes #107