Championship by the numbers??

How do the numbers on the blue alliance home page work? At the moment is says that 2528 routers have been engaged, but there have only been 288 matches played (48*6). And if you calculate the average rotor count from this, it comes out as greater than 8 rotors a match which is impossible! The same thing happens with the robots ready for take off. Anyone know wats going on?

Sent from my iPhone using Tapatalk

The numbers might possibly refer to the entire season, where a lot more than 288 matches have been played?

@M217 Hmm… I doubt it. The numbers would be significantly higher. For example, in 2017 alone, there have already been almost 14000 matches played.

Sent from my iPhone using Tapatalk

Math is hard. Will fix.

Sorry for the #fakenews. The numbers now should be correct.

@Eugene Fang Thank you so much :slight_smile: Out of curiosity, what was the issue?

Sent from my iPhone using Tapatalk

Diff appears to be here:

When data changes in the TBA database, we know something changed, but right now we don’t have a way of tracking what the old value was before the change. In order to reduce database reads, the “championship numbers” were being incremented if a match data changed (e.g. a match got played). However, if a match gets updated due to replay or something, we don’t subtract those old numbers out – we just increment them. That shouldn’t account for that large of a discrepancy, so something else was wrong, but I didn’t have the time to debug it further.

The fix was to make it so whenever a match gets updated, it fetches all championship matches and recomputes the numbers. While this is definitely more expensive in terms of database reads and computation, it’s not too bad due to the way we cache things and was the quick and dirty fix for now.