Page 1 of 1

Posting stats, again

Posted: Sun Oct 25, 2009 3:15 pm
by Ari Rahikkala
So Scott asked me to install Antica's AntiStats on Shireroth's forum, and... well... OK, I'll be honest, I'm pretty much just being a scrub here, and I know it wouldn't *really* be a problem, but... I just don't want us to be running a program that displays daily stats by making a database query for each day separately. It adds up to over 3000 queries for Shireroth, you know. For every time someone looks at those stats... and you just know some genius is going to be crawling or reloading them constantly. I know our webhost has pretty beefy servers out there working for our benefit, but just for the sake of being nice to our host, I wanted a more efficient solution.

Long story involving funny things like the Most Static Build In The World and Failing Attempts To Remove Databases That Weren't There In The First Place short, I can compile stats efficiently on my home box but not on shireroth.org. (I could do it on shireroth.org too but that'd require me to write stuff in PHP or somesuch rather than Haskell) So I just hooked the stats generator up with the weekly backups (currently taken at 0:00 Finnish time on Sundays), and the posting statistics files get uploaded automatically about a dozen minutes after that time to:

http://shireroth.org/forum/statsDaily.html
http://shireroth.org/forum/statsMonthly.html

Re: Posting stats, again

Posted: Sun Oct 25, 2009 3:40 pm
by Gman Russell
Wow. Good job!

Re: Posting stats, again

Posted: Sun Oct 25, 2009 3:42 pm
by Chrimigules
Long story short: Ari dislikes your work, Foghorn.

Re: Posting stats, again

Posted: Sun Oct 25, 2009 3:49 pm
by Scott of Hyperborea
*sigh* I felt guilty asking you to do something, but I figured it wasn't too much trouble since Foghorn had already coded the whole thing. And then you have to go and rewrite it. Should've known that would happen. Thanks, though.

Why does it stop at 9-25?

Re: Posting stats, again

Posted: Sun Oct 25, 2009 4:02 pm
by Ari Rahikkala
It stops at 9-25 because some idiot once thought that natural numbers start at 1 rather than 0. Fixed.

Re: Posting stats, again

Posted: Sun Nov 01, 2009 5:40 pm
by Scott of Hyperborea
It was fixed for a little while, but now it's ending at 9-30 again.

Re: Posting stats, again

Posted: Mon Nov 02, 2009 7:43 am
by Ari Rahikkala
Ack. Forgot to actually place the fixed program where it gets called by cron, so the old one took over there. Fix'd, new stats uploaded.

Re: Posting stats, again

Posted: Sun Jan 17, 2010 2:03 pm
by Ari Rahikkala
I am having some doubts about cron doing its job properly...

Re: Posting stats, again

Posted: Sun Jan 17, 2010 2:43 pm
by Scott of Hyperborea
Why don't you have one of those that updates monthly or whatever it wants to do, and a version of the Antican program that just displays up-to-the-minute stats for the last thirty days? That way it won't require as many database calls, but we can still see whether or not our post count has been going up or down recently.

Re: Posting stats, again

Posted: Sun Jan 17, 2010 2:45 pm
by Ari Rahikkala
Eh... well, for what it's worth I actually asked Bluehost about hosting Haskell stuff, and they said it's OK... so I might be doing something about this... at some point... or I might just write the saner code in PHP, it's not like it's complicated, I mostly just did in Haskell to see what interfacing with the database to do something practical is like in that language..

Re: Posting stats, again

Posted: Thu Jan 21, 2010 8:27 pm
by Bill3000
What's with 2004? There's like no posts.

Re: Posting stats, again

Posted: Thu Jan 21, 2010 11:53 pm
by Ari Rahikkala
'tis the ezhack. There were posts in that time... then there weren't.

Re: Posting stats, again

Posted: Thu Jun 10, 2010 5:01 pm
by Scott of Hyperborea
This broke again. Now it stops at 5-19.