Nil Punkt for my design of the supply level audit table.
Every time the capacity of a vehicle for a given HCUnit changes, its added to a save list. Once every 5 seconds the vehicles on the savelist are checked to see if they haven’t returned to their original value and saved.
Trouble is these tables are getting kinda large, and I don’t need to retain the fidelity I have after 7 days. I might start by reducing the frequency of saves on the host from 5 seconds to 60 seconds.
But what about the data I already have. I can’t average it, I can’t min or max it. It seems like I’m going to have to massage my archive by writing just the first and last entry in each given 15 minute window.
I was contemplating doing this with a relatively simple stored procedure that uses cursors. But it seems kind of lossy to me so I’ve half a mind to write a perl script instead and have it follow trends instead so that if the number goes up or down for 8 points and then changes direction, I write the change-in-direction point.
When you move between towns, the equipment gets ‘transfered’ – it’s actually still on the spawn list, but the count that gets sent to the client is onSpawnList – inTransfer. The number I write to the database includes the transfer vehicles so transfer-trickle doesn’t appear in the tables.
With that in mind, and with a 7 hour resupply time, I think it might be safe to go with the first and [where relevant] last approach. I just hate the lossiness.
I thought about going high and low, but which do you write first? :)
I’m also regretting this layout from a stats point of view since, in order to generate “over time” charts I have to manually fill in missing datapoints — if the number of sappers on a list drops to 4 at 6pm but I want to analyze the list at 7pm, there’s no data point for sappers at 7pm.
This was a nuisance for my chart since I’m aggregating strengths by weapon category – which means for each time there is a point for any weapon, I have to project the last known value for each other weapon in that category — there might only be data points for sappers at 6pm and 7pm, but riflemen and smgs will have data points all the way inbetween.
Very messy. Of course, if I just wrote all of the spawn lists every minute, I’d have a whole hell of a lot more data points messing with my head :)