Author Topic: Tremstats: Statistics for tremulous servers  (Read 13905 times)

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« on: October 19, 2006, 11:51:41 pm »
Hi all and good evening (to german people).

The last two days, I figured out some way for a good parsing of the games.log with the help of Ingar. After applying tjw to my server, I am now able to log deconstructions and destructions, which are very important for a tremulous statistic I think. The only problem is, that I cannot differ between normal kills and team kills at the moment, but WolfWings promised me to write a patch, so they will be marked as teamkills in the logfile.

The current status of the Tremstats is very low at the moment. It's version 0.1 and misses still many things in the output, but the parser is full functional. If you want to see it, take a look at the following URL:

http://tremstats.dasprids.de/

You can also play on the server, located in Germany, Frankfurt. It's ping is very good in and around Germany, and maybe also in the USA, test it. As I said, TJW is installed on the server. You may find it in the gamebrowser, called [DB@]DASPRiD's, or simply do a /connect dasprids.de.

If you have any suggestions, what I could implement in the statistics, just post your suggestions here. If they are possible (the log-file limits me), and they are ok, then I will add them to the statistics. But don't post things twice; the following things are still planned:

Overall:
  • A search for player names


For the player details:
  • Single "weapon" statistics
  • Decones
  • Destructions



After Tremstats has a good development status, it will be published under the GPL.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Tremstats: Statistics for tremulous servers
« Reply #1 on: October 20, 2006, 01:15:42 am »
Cool cool.

When can we get this?

∧OMG ENTROPY∧

Smokey

  • Posts: 793
  • Turrets: +23/-58
    • Zilla Clan
Tremstats: Statistics for tremulous servers
« Reply #2 on: October 20, 2006, 01:41:53 am »
Good start, good idea, good work :)

squishy

  • Posts: 91
  • Turrets: +1/-0
Tremstats: Statistics for tremulous servers
« Reply #3 on: October 20, 2006, 01:56:25 am »
Feel free to look at the Boom Boom stats page for some ideas. I'm waiting until GUIDs are implemented in the base install of Tremulous before working on my system anymore.

http://fragify.com/stats.php
--df

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Tremstats: Statistics for tremulous servers
« Reply #4 on: October 20, 2006, 05:30:25 am »
Is this AJAX? because it behaves very fast.

∧OMG ENTROPY∧

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #5 on: October 20, 2006, 07:27:32 am »
No, it isn't, I hate AJAX. But since its a really good XHTML-code plus nice CSS, good browsers like Firefox don't re-render the full page, but only the changed parts.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Tremstats: Statistics for tremulous servers
« Reply #6 on: October 20, 2006, 11:04:24 pm »
Depends on what you call AJAX. If only one part of the page changes, and it isnt in a frame, its ajax to me.

It isnt the formal, dictionary def, but its still what i call ajax.

For example, on my site http://test.halolivewire.com (halo live wire is a podcast, im developing their site, the subdomain is for testing purposes), i have a chatbox on the left part of the page. The chatbox is just hooked to the sql database tightly, so it refreshes, but doesnt reload the whole page.

∧OMG ENTROPY∧

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #7 on: October 21, 2006, 04:44:53 am »
I load a full new site on reordering the top 10. Javascript is only used to change window.location.href.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

Undeference

  • Tremulous Developers
  • *
  • Posts: 1254
  • Turrets: +122/-45
Tremstats: Statistics for tremulous servers
« Reply #8 on: October 22, 2006, 01:55:08 am »
Gecko doesn't rerender pages instantly unless specifically set to do this. Gecko based browsers appear not to update when reloading pages with unchanged data even when they are not caching. This is nothing to do with AJAX, but with the renderer.
Need help? Ask intelligently. Please share solutions you find.

Thats what we need, helpful players, not more powerful admins.

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #9 on: October 22, 2006, 04:40:17 am »
Ok, enough for today. I worked the last 8 hours on the parser and the frontend. Now there are nearly all things parsed. WolfWings wrote the patch, so I can track teamkills now, I only need someone to compile it for me. You can see the current results at the known URL and expect the first release soon.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

robug

  • Posts: 50
  • Turrets: +0/-0
Re: Tremstats: Statistics for tremulous servers
« Reply #10 on: October 22, 2006, 05:39:52 am »
Quote from: "DASPRiD"


http://tremstats.dasprids.de/



You gotta check this stats package out!!  DASPRiD did a great job!!

I cant wait to install it on yaknet lair!

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #11 on: October 22, 2006, 10:33:50 pm »
Well, thx to WolfWings, his patch is working now and I can log all teamkills. I made a switch, so it will also read the logs of nonpatched servers without complaining, but teamkills are logged as normal kills then. I will now add "top teamkillers" next and then put some more information into the player details, then I can release the entire package. It will contain the following things:
  • .patch file written by WolfWings for propper logging of teamkills
  • patched game.qvm for all lazy guys (based on current TJW)
  • Parser and data-evaluator, written in Python, requires the site-package MySQLdb
  • Output-system, written in PHP, requires PHP 5.* and MySQL 4.0 or higher. Includes a simple template-system (its called PHP ;)) for easy changes of the layout.


Everything, except WolfWings' patch and the tremulous icons, will be released under GPL Lesser Public Licence, so you are free to modifie anything of it. But I recommend to not do too many changes to the parser itself, because their could be follow some more changes until the final release.

Ok, thats so far, good night and stay tuned for the release.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

Rawr

  • Posts: 918
  • Turrets: +1/-1
Tremstats: Statistics for tremulous servers
« Reply #12 on: October 23, 2006, 12:44:23 am »
ok so does a syop have to install somethign into server to get stats? what do i need to do to see like my name up there?
img]http://dvclan.org/statsig/statsig.php/3826/4.jpg[/img]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #13 on: October 23, 2006, 05:27:20 pm »
No, you missunderstood me I think. You only need the patch, if you want teamkills to be logged. The stats still work on every Trem-version, but TJW version is minimum recommed, to log deconnings, and more important, destructions. A guy, who only sits on his turret and spamming lucifers should not have more points than someone, risking his life a cuple of times, which sawing overmind after overmind.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

Rawr

  • Posts: 918
  • Turrets: +1/-1
Tremstats: Statistics for tremulous servers
« Reply #14 on: October 23, 2006, 11:04:03 pm »
ok i understand now. im not very good with patches ^.^
img]http://dvclan.org/statsig/statsig.php/3826/4.jpg[/img]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #15 on: October 23, 2006, 11:45:02 pm »
Just another thing I considered about, will it do tomorrow:

For always having the levelshot and real names of all maps, the parser will run through the PK3-files, and put map-name and it's levelshot (resized) into the database. I put the image into the database, because it should still work for remote machines. But I won't let them stay there. The output checks for new images in the maps table, and moves the images into real files.


... well, I think, the name `parse_log.py` will not be right any longer ;)
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #16 on: October 24, 2006, 11:12:15 pm »
Ok, the single file got too big, just splitted the "parser" into 3 submodules:

tremstats.py - main file
internals.log_parse - parser for log files
internals.data_calc - calculator for MySQL data
internals.pk3_read - reader for PK3 files

Now the requirements are the following:
Python Version 2.4 or 2.5

Plus the following site-packages:
MySQLdb
PIL

------------------------------------------------------------------------

For the less guys waiting for a release:
You will get Tremstats this saturday, promised!
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #17 on: October 25, 2006, 06:46:19 pm »
Alright, the PK3 reader is done and supports TGA and JPEG now. Take a look on the output:

http://tremstats.dasprids.de/most_played_maps.php

Now I have to finish only some other little parts, then you will get it.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

durand

  • Posts: 201
  • Turrets: +0/-0
Tremstats: Statistics for tremulous servers
« Reply #18 on: October 25, 2006, 07:04:23 pm »
wow, very cool idea. however, i did notice that the graphs aren't right. aliens and humans are always equal.. :(

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #19 on: October 25, 2006, 07:08:06 pm »
Uhm, what you mean?  :-?

-Edit-
Oh I see, the legends. Well thx for the info, I correct it :)
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #20 on: October 25, 2006, 10:19:17 pm »
Did I say saturday? I meant today ;)! You heard right. And beause I've written enough in the readme file, I don't repeat myself here again. So download it now and have fun. Please reports all bugs you find. Suggestions and things like that are also wanted :).

http://dev.dasprids.de/downloads/tremstats_0.4.tar.gz
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

Paradox

  • Posts: 2612
  • Turrets: +253/-250
    • Paradox Designs
Tremstats: Statistics for tremulous servers
« Reply #21 on: October 25, 2006, 11:23:18 pm »
Sweet. Ill try getting this up for SST.

∧OMG ENTROPY∧

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #22 on: October 25, 2006, 11:31:22 pm »
Damn, there were a little bug in it, which let the parser crash on bad log data. And a directory was missing so the logs didn't get archived. Here your get a fixed version:

http://dev.dasprids.de/downloads/tremstats_0.4.0.2.tar.gz
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #23 on: October 26, 2006, 11:43:52 pm »
I just setup a project page for tremstats on dev.dasprids.de, so the download link changed. Take a look:

http://dev.dasprids.de/programs/tremstats/
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #24 on: October 27, 2006, 04:47:54 pm »
A note on version 0.5:

It will include my library for real-time server statistics. So you will see in the overview, who is currently playing on your server and which map.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

durand

  • Posts: 201
  • Turrets: +0/-0
Tremstats: Statistics for tremulous servers
« Reply #25 on: October 28, 2006, 12:11:49 pm »
nice player features!

Greudin

  • Posts: 131
  • Turrets: +1/-1
    • http://tremulous.bricosoft.com
Tremstats: Statistics for tremulous servers
« Reply #26 on: October 28, 2006, 05:37:13 pm »
TY Dasprid ! The best tremulous stats ever ! Your code is clean and readable. Separation of parser(python+mysql) and php+css makes hacks easier.

Used there :
http://tremx.bricosoft.com

url=http://tremulous.bricosoft.com][/url]

Shafe

  • Posts: 75
  • Turrets: +0/-0
Tremstats: Statistics for tremulous servers
« Reply #27 on: October 30, 2006, 07:59:46 am »
agreed!  This is turning out awesome.. Nice work man!
URL=http://www.beer-garden.org/bg2/][/URL]

DASPRiD

  • Administrator
  • Posts: 549
  • Turrets: +21/-2
    • http://www.dasprids.de
Tremstats: Statistics for tremulous servers
« Reply #28 on: October 30, 2006, 08:51:04 am »
Thx guys, I'm proud of it that this gets really used :).

Some other notes on version 0.5:

  • Integration game factor into total effiiency. The calculation of the game factor will be something like square root of game numbers of player with some other numbers calculated. So a player, whos playing only one or 2 games, but does many kills in this single game, maybe because of noobs on the other side, gets a low efficiency. The more someone plays, the game factor gets less significant, because of the square root. So with 500 games total on a server, it is nearly unimportant, if you have played 400 or 450 games.
  • Change to the calculation of destruction efficiency. It isn't well calculated yet.
  • Games with no actions in it get dropped by the parser.
  • Integration of team statistics for player details. There you can see, in which teams the player mostly wins / get tied games.
  • As told, real time view of running server.


The first two points only require a `tremstats.py --calconly`, and you get the new changes. The 2 points after need a reparsing of the logfiles. If you did not clear the archived_logs directory, you may run `cat ./archived_logs/* > ../games.log && rm ./archived_logs/* && ./tremstats.py` to reparse all logs... Well, I should integrate another argument to reparse all archived_logs, could be useful.
And yeah, the last points only needs to replace the overview template.

Thats so far.
url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=mail%40dasprids%2ede&item_name=DASPRiD%27s&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8][/url]

vcxzet

  • Guest
Tremstats: Statistics for tremulous servers
« Reply #29 on: October 30, 2006, 09:43:21 am »
GAY
AAA
YAY

good job dasprid