Posting stats, again

Manages technical infrastructure for the board and website; make administrative requests here

Moderator: Erik Mortis

Post Reply
User avatar
Ari Rahikkala
Posts: 4326
Joined: Sun Jan 21, 2001 12:56 pm
Contact:

Posting stats, again

Post 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
No-one should be without a parasol, Sirocco.

User avatar
Gman Russell
Posts: 3947
Joined: Thu Aug 23, 2001 3:31 pm
Location: Russell Castle, Mirioth
Contact:

Re: Posting stats, again

Post by Gman Russell »

Wow. Good job!
What follows has lead me to this place where I belong, with all erased.

User avatar
Chrimigules
Posts: 473
Joined: Sun Jan 08, 2006 8:28 pm
Location: Ano, Kaikias, Antica
Contact:

Re: Posting stats, again

Post by Chrimigules »

Long story short: Ari dislikes your work, Foghorn.
Image

User avatar
Scott of Hyperborea
Posts: 2816
Joined: Wed Mar 24, 2004 5:17 pm
Location: Ireland
Contact:

Re: Posting stats, again

Post 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?

User avatar
Ari Rahikkala
Posts: 4326
Joined: Sun Jan 21, 2001 12:56 pm
Contact:

Re: Posting stats, again

Post by Ari Rahikkala »

It stops at 9-25 because some idiot once thought that natural numbers start at 1 rather than 0. Fixed.
No-one should be without a parasol, Sirocco.

User avatar
Scott of Hyperborea
Posts: 2816
Joined: Wed Mar 24, 2004 5:17 pm
Location: Ireland
Contact:

Re: Posting stats, again

Post by Scott of Hyperborea »

It was fixed for a little while, but now it's ending at 9-30 again.

User avatar
Ari Rahikkala
Posts: 4326
Joined: Sun Jan 21, 2001 12:56 pm
Contact:

Re: Posting stats, again

Post 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.
No-one should be without a parasol, Sirocco.

User avatar
Ari Rahikkala
Posts: 4326
Joined: Sun Jan 21, 2001 12:56 pm
Contact:

Re: Posting stats, again

Post by Ari Rahikkala »

I am having some doubts about cron doing its job properly...
No-one should be without a parasol, Sirocco.

User avatar
Scott of Hyperborea
Posts: 2816
Joined: Wed Mar 24, 2004 5:17 pm
Location: Ireland
Contact:

Re: Posting stats, again

Post 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.

User avatar
Ari Rahikkala
Posts: 4326
Joined: Sun Jan 21, 2001 12:56 pm
Contact:

Re: Posting stats, again

Post 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..
No-one should be without a parasol, Sirocco.

User avatar
Bill3000
Posts: 1684
Joined: Fri Apr 13, 2001 5:13 pm
Location: Apoltopoli, Audêntija Grakent, Kildare, Šireþe
Contact:

Re: Posting stats, again

Post by Bill3000 »

What's with 2004? There's like no posts.
Senechal Bill Trihus of Greater Audentior
Citizen of Shireroth
Zor nukrô šempi zor fredrô

User avatar
Ari Rahikkala
Posts: 4326
Joined: Sun Jan 21, 2001 12:56 pm
Contact:

Re: Posting stats, again

Post by Ari Rahikkala »

'tis the ezhack. There were posts in that time... then there weren't.
No-one should be without a parasol, Sirocco.

User avatar
Scott of Hyperborea
Posts: 2816
Joined: Wed Mar 24, 2004 5:17 pm
Location: Ireland
Contact:

Re: Posting stats, again

Post by Scott of Hyperborea »

This broke again. Now it stops at 5-19.

Post Reply

Return to “Ministry of the Interior”

Who is online

Users browsing this forum: No registered users and 2 guests