MCStats / Plugin Metrics (R7) - Easy & advanced Plugin Statistics

Discussion in 'Resources' started by Hidendra, May 25, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Hidendra

    Oops, forgot to migrate the wiki. It's up there now, take a look at https://github.com/Hidendra/Plugin-Metrics/wiki/Usage
     
  2. Offline

    TruDan

  3. Offline

    hawkfalcon

    0.o this page was last edited by TruDan 5 mins ago. WHAT DID YOU DO?:0
     
  4. Offline

    TruDan

    Fixed one of the links, it went to the old repo which went to a 404 page. so it now goes to the one that it should :p
     
    hawkfalcon likes this.
  5. Offline

    Lolmewn Retired Staff

    Just a question.. what do you use to create the graphs? Some Google API?
     
  6. Offline

    Hidendra

    The graphs use Highcharts / HIghstocks.

    I was using Google charts at first, they look nice, but I found they tend to not work so well with undeterministic data or volatile data and would need additional post processing stuff.

    PS all of the libraries (I think) that I use are at https://github.com/Hidendra/Plugin-Metrics/blob/master/CREDITS
     
  7. Offline

    TruDan

    Awesome! I thought they were jQuery's jPlot or something like that xD i used to use jpgraph's api within PHP, but i may use this one, its pretty cool!
     
  8. Offline

    Hidendra

    I used jpgraph years ago for a different data collection project I did, I liked it but Highcharts is nice because it's entirely Javascript not just an image like jpgraph (but can still be easily exported to an image if needed!)

    You just need to be careful you're not using it for a commercial project unless you want to fork over some dough (obviously I'm not so hoorah)
     
  9. Offline

    TruDan

    Yeah, Most things i get are like that, such as icons etc. They're okay for personal use, or for a project. but not for selling on. Which i dont do either :3
     
  10. Offline

    Malikk

    Would you mind explaining the version trends graph? I'm not quite understanding what it's supposed to represent. It's clearly not just the number of people using each version so I'm a little unclear as to what's going on, lol.
     
  11. Offline

    Hidendra

    When a plugin upgrades or downgrades to that version, it increments it. That DOES NOT include new installs, a server must have the plugin installed already (i.e server just installed A, no change on graph. Then server installs B, B shows +1 on the version trends graph)

    Pretty useful to see how many people update to a new version (and when), mainly. Version distributions can be seen in the table on the left
     
  12. Offline

    Malikk

    Awesome, and useful. Thanks :)
     
  13. Offline

    Hidendra

    Rank changes are now visible on the site. If it increased/decreased hover over the image for title text to see the delta, e.g

    [​IMG]

    (or the plugin page)- [​IMG]

    Ranks are recalculated every 60 minutes now instead of 5 to make changes last longer. This means you may see your plugin have more or less servers than the one above or below it... ;)

    edit: also, on the plugin page is the time since the plugin's rank last changed now too. But that starts now, not in the past unfortunately.
     
  14. Offline

    Icemelt

    The only reason I came to this page.
     
  15. Offline

    Hidendra

    Changes just pushed to the live server:
    • All pages are now significantly quicker to load. They have been heavily optimized to generate in mere milliseconds (before, it was taking over a second in some cases which is completely unacceptable!) and the entire site should will feel much more responsive
    • Signature and plugin preview images are now cached
    • Graph data has been moved to JSON feeds. This means that data can be easily cached by the browser and will also allow more things in the future
    • If a graph has a lot of data, the lower 0.05% of the graph will be removed from output. This is normally output that isn't seen anyway so it will make most graphs that were sluggish before much more responsive.
    • New graph: Version Demographics which lists the amount of servers using any version. This removes the table on the left and perfectly complements Version Trends, which shows the versions that servers upgraded or downgraded to (from an existing version)
    Note on the API addition: Graph JSON feeds can currently be pulled from http://mcstats.org/api/1.0/PLUGIN/graph/NAME For example: http://mcstats.org/api/1.0/All+Servers/graph/Global+Statistics for pie graphs it will return pre-calculated data, e.g: http://mcstats.org/api/1.0/All+Servers/graph/Game+Version

    Additionally, a minor issue which has been wrecking havoc on the entire machine over the past while has been fully fixed. The backend is written in Jetty and requests are proxied to it via nginx. An issue appeared where thousands of connections between nginx and Jetty would stick upon closing and get stuck in the LAST_ACK state.

    This has been fixed by setting SO_LINGER on the underlying socket to 0, which will forcefully close the socket upon it being closed instead of gracefully exiting. Because I only output a few characters to the client and manually flush and close streams myself, I can guarantee that there will be no output waiting to get sent (and if it is, the client has probably already lost connection). This fully fixes the problem and now there is only <20 connections between nginx and jetty at any given time.

    This 'minor issue' being resolved means that the connectivity issues that have been plaguing servers the past while will no longer occur (at least, the ones caused by this).
     
  16. Offline

    Gavagai12

    Can you please tell, why there aren't any Graphes?
    It only says 'invalid date'.
     
  17. Offline

    Hidendra

    I see data on both of your graphs -- still having troubles? Try a different browser as well perhaps
     
  18. Offline

    Gavagai12

    Ok I tried it on two Computers both with Chrome and Firefox, but it still dosn't show any graphes. From ANY Plugin.

    Edit:
    I also checked it with different Browser on my I-Pad --> Didn't work as well.
     
  19. Offline

    PatrickFreed

    Found a little bug:
    [​IMG]
     
  20. Offline

    Hidendra

    The only thing I see wrong with that is the green down arrow -- clearing your cache should fix it. Otherwise what's wrong with that? Going from rank 225 to 226 is a decrease (as 1 is the highest rank)

    very weird indeed. In chrome if you open the dev console ( ctrl + j on windows i think, otherwise wrench -> tools -> developer tools ) are there any errors inside the Console tab?

    edit: Sleaker noticed this as well, it was because he was on http://metrics.griefcraft.com -- you may be on a different site but it's advised you use http://mcstats.org but this will be fixed in a few minutes
     
  21. Offline

    PatrickFreed

    Oh, I completely misunderstood what that meant. All is well. :p
     
  22. Offline

    Gavagai12

    It is now working. Thank a lot!
     
  23. Offline

    TruDan

    Server is down, think it may be a ddos attack because a moment ago i was getting bad gateway and stuff. But now its saying cant connect to db master. Thought i'd let you know
     
  24. Offline

    Hidendra

    aha, how highly inconvenient. Not a ddos, I was able to at the very least access switch port readings. Im in the middle of nowhere right now but I'll see what I can do ..

    Connected via 3g, issue has been spotted but may be a few minutes to be able to diagnose and fix it over this connection.

    MySQL is now starting back up and as soon as it does this will be fixed.

    This was caused by a memory only table in mysql becoming too full which eventually crashed the mysql process. This lead to the connection buffers in most of the machine to become overloaded which caused a butterfly effect.

    More care will be taken in the future and once I am able this will be further looked into with periodic automatic purges of this memory tables at optimal times.

    EDIT: Mysql is having some troubles with starting up (quitting halfway through recovery). Reporting has been blackholed now and I will look ASAP. Apologies for the inconvenience ..

    EDIT2: all good now, apparently mysql started up ok .. :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Oct 29, 2015
  25. Offline

    Gavagai12

    Is something wrong with the Server?
    I have 1 Server/ 5 Players.
    An hour ago i had 205 Server/ 1140 Player.
    This isn't normal!
     
  26. Offline

    TruDan

    Hey, do you know of an easier way of making a graph for all types of mobs? Instead of doing them all seperate addPlotter, i was thinking of making them some kind of loop from a hashmap... is this possible in any way?

    Done it :)
     
  27. Offline

    KeybordPiano459

    I already love MCStats so much, my plugin is usually hanging around the 150 mark (MCWeapons) but if you could make an iOS app for MCStats so that I could track what my server's rank is throughout the day, that would make it so much better, I would honestly pay for an app like that. Thanks for this Hidendra!
     
  28. Offline

    Hidendra

    That would indeed be cool ;) I've never touched iOS development before though so I don't think I'd be the one to do it unless I spent the money to get the signing certificate

    As of last night, the server is now based in Montreal (QC). Before it was in France. This will provide overall better pings across the board where North America -> FR used to see 100-130+ ms pings, whereas now EU -> Montreal (QC) is only about 80-90 from testing a few different ISPs. (not to mention I'm located in Canada -- east coast -- so it is of course beneficial for me to be close by ;))

    Also, the hardware is downsized a bit and after testing a few days ago it was found that the SSD is no longer needed, so the current setup is a zfs mirror which is working perfectly.

    edit: also, fun fact- it now appears we are serving 560-600 requests per second! If it keeps up like that 24/7, it will mean we'll see over 50 million requests a day, and at least 1.5 billion per month :)
     
  29. Offline

    Jozeth

    Where can I find the API so I can use some of the information on my site (Server, Starts)?
     
  30. Offline

    MrFigg

    Jozeth likes this.
Thread Status:
Not open for further replies.

Share This Page