Ant Zucaro [Wed, 24 Dec 2014 21:55:17 +0000 (16:55 -0500)]
Speed up weaponstats requests by 2.5x.
We can exploit the GIN index on games.players to quickly get a list of the most
recently-played games. We construct this list as a subquery that can be used in
an IN list in the main weaponstats query, greatly reducing the time needed to
fetch the rows. It's about 2.5 times faster according to apache bench.
Additionally this query is helped by moving it to a subquery, whereas once it
was two queries (thus two round trips to the DB).
Ant Zucaro [Mon, 8 Dec 2014 03:21:31 +0000 (22:21 -0500)]
Use Google Charts instead of NVD3.js.
The latter had some performance regressions after updating chrome.
These regressions caused browsers to crash in the worse cases.
Migrating to the Google Charts API provides a similar implementation
with a much nicer API. We get:
- Consistent colors for each weapon
- Clickable data points (events on selection)
- Tons of customization via a simple JSON options object
- No additional source files
- No need to buffer weapon stats JSON data with "zero" entries
Right now the AJAX requests are still using D3.js style. The next
step is to migrate them to jQuery or vanilla JS.
Ant Zucaro [Wed, 3 Dec 2014 03:46:20 +0000 (22:46 -0500)]
Do not rank sole qualifiers.
If a player is the only one with >= 32 Elo games, don't show their rank. They
are the only one present in the pool! It makes no sense to say a person ranks
in the ranking pool before showing status that way.
Ant Zucaro [Sun, 11 May 2014 00:22:46 +0000 (20:22 -0400)]
Add Xolonium glyph support. No more ASCII-only!
Our wonderful font artist sev has been working hard on the
Xolonium font for quite some time. He has posted a darkplaces to
standard unicode code point mapping for me to utilize in turning
the characters chosen in-game with actual glyphs in his font. The
result is awesome!
Ant Zucaro [Thu, 10 Apr 2014 12:29:50 +0000 (08:29 -0400)]
Add links to the game modes in the stat line.
The implementation of this is a bit funky. See the
comment in main.py for the get_day_summary_stats
function call. Long story short is I picked what I
believe to be the lesser of two evils - I'm
assembling a complex string inside the view instead
of putting a Python code block directly in the template.
Ant Zucaro [Sat, 5 Apr 2014 13:43:18 +0000 (09:43 -0400)]
Reconfigure the day stats line.
It now shows the top five most active game modes and
summarizes the other ones as "other". This way people
can see what's being played dynamically rather than the
three static modes shown before (dm, ctf, duel).
Ant Zucaro [Fri, 4 Apr 2014 21:58:45 +0000 (17:58 -0400)]
Add a daily statline to the home page.
Gets the following aggregate statistics about the past 24 hours:
- the number of active players (day_active_players)
- the number of games (day_games)
- the total number of dm games (day_dm_games)
- the total number of duel games (day_duel_games)
- the total number of ctf games (day_ctf_games)
Cached by the hour, although it is not a terribly expensive query..
Ant Zucaro [Sun, 27 Oct 2013 02:03:02 +0000 (22:03 -0400)]
Add a view to show the most active players.
For the longest time we have had a box on the front page showing
the "most active players" by playing time. We only showed ten at
a time, and I've since received tons of requests for more. This
commit provides that more.