Scat, I started playing with the new Server Stats timer (thank you for that!) but I have a question about the updates.
For one thing, I'd like the timer to be configurable for all these stats threads - though right now it is not important. But for now, also, I'd like to bump the Server Stats from 60 seconds to every few hours, or even 30 mins. I don't think that needs to run every minute. But other than that, looks awesome.
So the question - I understand how stats change when connections are made, peak connections, etc. But what about relatively static things, like total unique accounts (104), total characters (105), average character level (106)?
These are the SQL's:
Code: Select all
select count(distinct account_id) from characters;
select count(id) from characters;
select round(avg(level)) from characters;
I am just not sure where to stick them. Inside the UpdateServerStats() function?
This goes along with the concept of calculating the "Most/Highest" stats on a cycle. Maybe I shouldn't be using ServerStats for that, but you tell me...