PDA

View Full Version : [March 3] Stats Update



Wizzup?
03-03-2011, 10:22 AM
Hereby announcing SRL Stats release-1.3. Nothing too exciting. Except for the fact that it has been completely stable for four weeks now. I'm not going to declare it bug free, but it seems to no longer crash. ;)

Although all the bug fixes and features have gone into SRL-Stats as soon as I fixed them, I did add some additional features this morning.


Graphs (as previously posted)
Added a ``personal'' page. (New!)
Upon register the user will receive a link to his ``page''.
Lots of other bug fixes and tweaks, see change list below.


Changes:


$ git shortlog release-1.2..release-1.3 --no-merges | cat
Merlijn Wajer (54):
Query: Work around mySQL bug.
Query: Fix more MySQL bugs.
Query: Fix MySQL bug part three.
Query: More mySQL madness.
README: Fix typo.
Query: Add MySQL workaround for new user_script.
Stats: Fix a couple of bugs.
Stats: Add a lot of documentation.
Documentation: Add sphinx documentation.
Stats: More documentation.
Stats: Add exception handling when committing.
Templates: Add owner of script.
Stats: Less strict on empty variables.
Templates: Show commit date on scriptcommits.
Stats: Add more logging.
SQL: Small cleanups.
Stats: Small changes.
Stats: Update TODO. Start session switch.
Stats: Remove unused spaces.
Stats: New session alternative should now work.
Stats: Remove a few prints.
Stats/commit.html: Add link to commit filter.
Stats/commit.html: Remove slash.
Stats/commit.html: Totalle tested that...
Stats: Fix variable/all.
Tools: Updated addvariable to use new session.
Minor change to the TODO file.
Stats: Update URL list.
Stats: Add initial graph support.
Stats: Add failsafe.
Stats: Fix import dependency.
Stats: Fix constant month.
Stats: Add more graphs.
Stats: Remove pylab; use matplotlib main API.
Stats: ``Simplify'' graph code.
Stats: Fix bug with MySQL Database.
Stats: Add extra error handling.
Stats: Fix bug when post data is None.
Stats: Remove a print.
Stats: Fix import.
Stats: Fix issue in register_user. Stupid mistake.
Stats: Experimental support for variable ID's.
Classes: Increase variable name length.
Stats: Change variable length.
Stats: Show URL to user page on register.
Stats: Loginform redirects to user page.
Stats: Add personal page.
Stats: Add more information to personalised page.
Stats: Fix desc usage.
Stats: Add additional text.
Stats: Addtional template fixes.
Stats: Fix loginform redirect.
Stats: Fix query.
Stats: Update TODO.

YoHoJo
03-03-2011, 07:38 PM
Hoorah, personal page thank you!
Could it also possibly show each script ran, and next to that total time ran of each script?
And variables too?

I really wanted a personal page this is great, thanks for the hard work!

Wizzup?
03-03-2011, 10:29 PM
Hoorah, personal page thank you!
Could it also possibly show each script ran, and next to that total time ran of each script?
And variables too?

I really wanted a personal page this is great, thanks for the hard work!

What do you mean, each script ran? All the scripts you've ever committed to? And the total time you committed to it?

YoHoJo
03-03-2011, 10:59 PM
YoHoJo

Scripts Ran:
P.M.S:
3 days 2 hours 4 Seconds

M.S.I:
5 days 6 hours 3 seconds

etc. etc.

and maybe

Vaiables:
Iron Mined: 942724 ores
Copper Mined: 234902 ores
Tuna Fished: 2340234 Fish
etc. etc.

^Yes to your post basically. These things would be nice additions to the 'Personal Page'.

Coh3n
03-11-2011, 02:56 AM
YoHoJo

Scripts Ran:
P.M.S:
3 days 2 hours 4 Seconds

M.S.I:
5 days 6 hours 3 seconds

etc. etc.

and maybe

Vaiables:
Iron Mined: 942724 ores
Copper Mined: 234902 ores
Tuna Fished: 2340234 Fish
etc. etc.

^Yes to your post basically. These things would be nice additions to the 'Personal Page'.
You mean like this (http://stats.villavu.com/user/8/script/21)? :)

Wizzup, I think a search feature would be a nice addition. To search for a variable or a user.

smurg
03-11-2011, 03:40 AM
Managing a script seems broken.

Yago
03-11-2011, 03:42 AM
Yeah it gives me an error like cannot find page ...

Coh3n
03-11-2011, 05:03 AM
You guys should try to be more specific. "Cannot fine page" could mean the server is down, but in this case it seems to be in the server itself. This is the message I get when I try to manage any one of my scripts.

"We could not find the page you requested in our web space:"

Smartzkid
03-11-2011, 07:10 AM
User rankings would be pretty neat ;)

I'm loving the user page, it's very useful! Thank you Wizz!

Wizzup?
03-11-2011, 11:06 AM
Managing a script seems broken.

Fixed.


User rankings would be pretty neat ;)

I'm loving the user page, it's very useful! Thank you Wizz!

Yeah. I need to figure out temporary tables in SQLAlchemy. :)

Yago
03-11-2011, 06:45 PM
Can there be an option to remove variables then? I accidentally added one.

Wizzup?
03-11-2011, 06:48 PM
Can there be an option to remove variables then? I accidentally added one.

It is planned. Thing is that I'll also have to change all commits that may have previously touched that variable.

I'm working on user ranks atm.

Yago
03-11-2011, 06:54 PM
ok. thanks

Coh3n
03-11-2011, 08:15 PM
Apparently there's a variable "Trout Cooked" and "Raw Trout Cooked". I'm not sure how difficult it would be to add a system that compares a variable to be added with existing ones to make sure the same thing isn't added twice.

Zyt3x
03-11-2011, 08:33 PM
I think the whole variable system is a bit messy and poorly planned as it is right now...
I think it would be better with IDs instead of strings

Wizzup?
03-11-2011, 08:53 PM
I think the whole variable system is a bit messy and poorly planned as it is right now...
I think it would be better with IDs instead of strings

I disagree a bit; they both have their advantages and disadvantages. For example, if I somehow have to switch server and re-insert the database, the ID's for the variables may not be the same; whereas the names will be. Plus, the names are generally more readable in scripts. We'll have to discuss it in greater detail before we decide. The stats system supports using IDs too though. I added that recently. (A month ago or so)

Zyt3x
03-11-2011, 09:07 PM
I disagree a bit; they both have their advantages and disadvantages. For example, if I somehow have to switch server and re-insert the database, the ID's for the variables may not be the same; whereas the names will be. Plus, the names are generally more readable in scripts. We'll have to discuss it in greater detail before we decide. The stats system supports using IDs too though. I added that recently. (A month ago or so)Hmm.. Then what am I complaining about? ;)

Yago
03-11-2011, 10:13 PM
The stats system supports using IDs too though. I added that recently. (A month ago or so)

Wait, Can we have to put item ID's such as 315 for shrimps cooked?

Wizzup?
03-11-2011, 10:43 PM
Wait, Can we have to put item ID's such as 315 for shrimps cooked?

It should work, but the Simba file for stats probably needs to be adapted to support ID's too. But really, you should use the string. :)

Yago
03-11-2011, 11:20 PM
I am and they're working great. Thanks for the management fix :)

Wizzup?
03-12-2011, 09:03 PM
Added user ranks.

http://stats.villavu.com/user/1
http://stats.villavu.com/user/all/2

Smartzkid
03-17-2011, 04:03 AM
Time delta for the past 24 hours would be pretty awesome, anyone agree?

Wizzup?
03-17-2011, 09:09 AM
Time delta for the past 24 hours would be pretty awesome, anyone agree?

Quite agree! And it's perfectly possible too... For any time period.

Do you have a more concrete idea as to how you'd like to see it? My problem with the stats system is that it can do so much I get blown away by ideas and eventually end up implementing none because I can't think of a way to properly integrate them all in the system.

Also, what graphs would you guys (and girls) like to see most?

E: Perhaps also some ``weekly/monthly'' report. Who gained the most, what was the average gain. What were the most active scripts during that period...

TomTuff
03-17-2011, 09:37 AM
If a time delta is what I think it is, have a world map, and have it color coded - no use = white, green = low, red = highest; have some in between shades of course.

Yago
03-17-2011, 07:42 PM
I like the weekly/monthly ideas

Smartzkid
03-18-2011, 05:36 AM
Quite agree! And it's perfectly possible too... For any time period.

Do you have a more concrete idea as to how you'd like to see it? My problem with the stats system is that it can do so much I get blown away by ideas and eventually end up implementing none because I can't think of a way to properly integrate them all in the system.

Also, what graphs would you guys (and girls) like to see most?

E: Perhaps also some ``weekly/monthly'' report. Who gained the most, what was the average gain. What were the most active scripts during that period...

I'd love to see a user_time vs time graph + the derivative of the most current values for each user. Basically, just an indicator of how many scripts they're running at once.

http://upload.wikimedia.org/wikipedia/commons/7/7a/Graph_of_sliding_derivative_line.gif

Daily/weekly/monthly reports would be really awesome! (And probably easier to code than odd graphs and derivatives :p)

A way to compare specific users (on the same graph?) would be really cool as well.


If a time delta is what I think it is, have a world map, and have it color coded - no use = white, green = low, red = highest; have some in between shades of course.

Ahh, not quite what I meant (though that would be pretty neat!)

Coh3n
03-18-2011, 06:51 AM
One graph I'd really like would be one that shows the activity of the script (i.e. minutes run per week/month/even year if possible). Could also get in to specific variables, but I'm not sure if that's too much. I was thinking if one could track certain variables, they could realize that gold ore, for example, hasn't been mined using MSI for quite some time so that would lead them to believe something is wrong with the gold miner. But again, that may be too much and completely unnecessary.

Wizzup?
03-18-2011, 05:44 PM
I like your suggestions, all of them. :p
Time delta would probably be a bit like the GE does them, TomTuff. So "+42 in the last day".

Smartz, the graphs actually aren't too hard. there's just so much to create graphs with. :p (I use matplotlib for graphs)

Smartzkid
03-26-2011, 03:43 AM
http://img815.imageshack.us/img815/8363/huhl.png

Huh? (http://img815.imageshack.us/i/huhl.png/)

Wizzup?
03-27-2011, 09:12 AM
http://img815.imageshack.us/img815/8363/huhl.png

Huh? (http://img815.imageshack.us/i/huhl.png/)

Ranks are updated every hour. :)
https://github.com/MerlijnWajer/SRL-Stats/blob/master/stats.py#L208