The new mechanism for calculating statistics that I mentioned yesterday is now in place and in use on Kilg.us. Instead of only calculating team stats on your team page, Kilg.us now can calculate the stats anywhere on the site. The Team page has been updated so it is now using the new stats calculator which might show modest improvements in page load time (previously stats were calculated client-side, which is generally slower). More interesting, the Dashboard is now displaying summary team stats for all your teams and your Industry teams. The summaries display batting average, on-base percentage, and slugging percentage on the offensive side and ERA, WHIP, strikeouts per 9, and walks per 9 on the pitching side. All summary stats are only for the players currently in the team’s lineup.
After monitoring the performance of the new calculator, I plan to implement the stat totals on the daily boxscore emails. Look for that in the coming days (but not tomorrow).
In addition to the new calculator, I also had to put in place a new engine for collecting stats. Previously stats were collected each time a Team page was loaded. For every player on the team, Kilg.us would check if newer stats were available (newer than what Kilg.us had stored in its database). If there were, they would be pulled into the system and the database updated. This process is still in place. But this method meant if nobody had visited their team page on any given day, the stats that would be displayed on the Dashboard could be out-of-date.
To solve this dilema, I added a scheduled process to gather stats. The process runs on the hour from 10am-1am Eastern time each day (March through October, anyway). It collects the latest stats for every player that is associated with a team in Kilg.us. This means dashboard stats could potentially be a little out of date, but should be reasonably recent. And up-to-the-second stats are, of course, always available on your Team page.