Coder Social home page Coder Social logo

aikar / timings Goto Github PK

View Code? Open in Web Editor NEW
198.0 9.0 36.0 17.03 MB

Source to the Aikar's Minecraft Timings Viewer

Home Page: https://timings.aikar.co/

License: MIT License

Shell 1.10% PHP 20.91% JavaScript 49.27% SCSS 28.72%
minecraft-timings php spigot paper profiler minecraft aikar-timings minecraft-profiler minecraft-tools minecraft-api

timings's Introduction

Aikar's Minecraft Timings Viewer v2

This is the system behind https://timings.aikar.co/ that processes Timing reports. Timings v2 requires one of the following server softwares:

  • PaperSpigot 1.8.9
  • Paper 1.9+
  • Sponge (All)
  • Neptune
  • Nukkit

CraftBukkit/Spigot Support is very unlikely, but it is strongly recommended to use Paper anyways! Learn More and Get Paper here

If you can think of something to improve the system please feel free to PR it.

Technologies: JavaScript and UI

We are using JSX and React for front end development.

PHP is used to post process the JSON file into a more readable format and API processing, but i'm open to converting that to JS and removing the PHP from the project.

If you're up for that big of a project, please coordinate with me on IRC first and keep me in the loop on progress.

Contributing

The biggest thing holding this project back is the need for help! We would absolutely love any help on this project that you can give!

Current Active Contributors:

  • Aikar - Project Owner
  • willies952002
  • Fudgie (UI)

Want to contribute? Join #aikar Spigot IRC (join here), and let me know what your interested in working on so we don't have people working on the same thing.

Setting Up Environment

You need A webserver such as Apache or Nginx, and PHP 5.6 or PHP 7. Apache is preferred incase .htaccess is needed.

Check out repo, copy config.ini to config.dev.ini and edit to your needs.

You'll also need NodeJS v6.9 LTS You also need Yarn.

Run yarn after checking out project to install node dependencies. (This replaces npm install)

To compile static resources and monitor them for changes, simply run gulp and control + c to abort watching. Gulp will monitor all files for changes and recompile the css/js for you.

An initial debug data file is included in the project that will automatically load for dev environments.

You may create config.dev.ini to override config options like so:

trusted_ip="10.0.1.100"
dev_id=ae6cfe033ca541f39a0fc52c3b51b2e1

Timings File Format

The Timings v2 file format is not designed for public use. It is highly condensed and meant to be specially known how to parse it.

While the overall structure of the file is now done, we are still planning future additions to the data dump.

We ask that instead of trying to parse this file for your needs, to instead PR the change to this project instead so everyone can benefit from it.

This file format is proprietary and may change without notice.

License

Minecraft Timings (c) Daniel Ennis (Aikar) 2014-present.

Minecraft Timings is licensed MIT. See LICENSE

I'd really prefer if clones did not start up for no good reason.

Remember: when to fork.

I'm totally open to any reasonable improvement. So if you think it can be better, talk to me on Spigot or Esper IRC and PR :)

If I disappear from Minecraft, then please keep this tool alive!

timings's People

Contributors

aikar avatar broccolai avatar denwav avatar kisaragieffective avatar minidigger avatar phoenix616 avatar snyk-bot avatar tmfksoft avatar willies952002 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

timings's Issues

Separate summarizing Group Handlers

To clean up the root summary view, extract the group handlers into their own tab so things like Plugins/Mod Events//etc "summary" views can be seen separately and avoid duplicate views at the depth 0/1 view.

To do this, we will have to start at FST, and walk down the entire tree and mark every handler seen as a descendant.

Then find all handlers not marked and label them a summarizing handler

Then filter summarizing from the TimingsView and show them on a new View.

Public dataset

The old timings system allowed people to easily extract timings uploaded by other users by simply iterating over the ID, which allowed me and others to get a general idea of how people run their servers.

Is there any way to do this with the current system?

Suspect Chunks Support

Requires work on implementing servers to export,
but have servers export list of chunk x/z that have been seen to have a high count of E/TE, and have it shown in report.

Raw JSON on Client

After the UI Rewrite finishes, I would love to move the current PHP JSON > Object mapping done on the server that's pretty slow, to being done in the users browser as part of the javascript code.

The benefits of this is that we can defer parsing of the handler objects until they are actually rendered for the first time, tremendously cutting down mapping a majority of objects as most people would never expand the entire tree.

I will design the system in anticipation of this for when the data classes are used where i can.

Minecraft Crash Report

-- System Details --

Details:
Minecraft Version: 1.8.8
Operating System: Linux (amd64) version 4.9.0-8-amd64
Java Version: 1.8.0_191, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 4767383816 bytes (4546 MB) / 6442450944 bytes (6144 MB) up to 9663676416 bytes (9216 MB)
JVM Flags: 13 total; -Xmx9G -Xms6G -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=45 -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1MixedGCLiveThresholdPercent=50 -XX:+AggressiveOpts
IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
CraftBukkit Information:
Running: DytanicBukkit version git-DytanicSpigot-e025a7b (MC: 1.8.8) (Implementing API version 1.8.8X-R0.1-SNAPSHOT) false

DytanicSpigot based on PaperSpigot

Minecraft Crash Report

Description: Exception in server tick loop

java.lang.NullPointerException: Exception in server tick loop
at co.aikar.timings.TimingHistory$2$1.apply(TimingHistory.java:121)
at co.aikar.timings.TimingHistory$2$1.apply(TimingHistory.java:1)
at co.aikar.util.JSONUtil.toArrayMapper(JSONUtil.java:80)
at co.aikar.util.JSONUtil.toArrayMapper(JSONUtil.java:74)
at co.aikar.timings.TimingHistory$2.apply(TimingHistory.java:110)
at co.aikar.timings.TimingHistory$2.apply(TimingHistory.java:1)
at co.aikar.util.JSONUtil.toObjectMapper(JSONUtil.java:102)
at co.aikar.timings.TimingHistory.(TimingHistory.java:105)
at co.aikar.timings.FullServerTickHandler.stopTiming(FullServerTickHandler.java:71)
at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:831)
at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:666)
at java.lang.Thread.run(Thread.java:748)

Add ability to use filter/search bar in all views

Currently the search(filter bar does nothing in any view other than the Timings view. It would be really cool if the filter would

  • filter specific worlds, entities or tile entities in the Regions tab
  • filter config keys in the Config tab
  • filter plugins/plugin timings like in the Timings view in the Plugins tab (I guess this could be done already by switching to the Timings and searching for the plugin)

Recommend ZGC or Shenandoah GC instead of custon G1GC tunings in "wrong GC" error to user

Hey @aikar ,

Love your tool, it looks great and I'll definitely have to check it out if I host another server.

May I suggest that you change some of your documentation and your "Wrong GC" error message to recommend the Shenandoah GC or ZGC instead of Java's default G1GC with custom tunings?

It's been a while since I've dorked with this, but I'm pretty sure I remember finding I had drastically better performance with the fancy new Shenandoah GC or ZGC than with the old G1GC with similar custom tunings.

Please let me know, however, if you have better information.

I've compiled my related thoughts here:
mkrupczak3/jvmperfopts#1 (comment)

NPE on missin group ids \ Or maybe i am doing something very wrong :D

I am applying a more verbose way for timings, in case, show the specific location of tiles and its lag.

The point is, dependending on the server there are too many tiles of specific type, that is the why i need to "filter" them based on its cost.

That is something i already did.

But, when i filter them the site will get a NPE when some ids are being rendered.

What should i do?
Is there a way to remove them from the report?

Actually i am removing the ones i do not want at this point, using a continue;
https://github.com/PaperMC/Paper/blob/master/Spigot-API-Patches/0004-Timings-v2.patch#L1853

Here are two timings:

More verbose Tiles: https://timings.aikar.co/?id=3535610d3f944b7ea3f1cd64f67c684e
More verbose Tiles with NPE: https://timings.aikar.co/?id=1647d88641d7472692c73df3c63e6ec8

DragonProxy Timings V2 implementation

Hi @aikar , i've used your timigs engines many times and it was always helpfull (on spigot & paper).
I'm working on a Minecraft related software called DragonProxy, witch provide a protocol bridge between Pocket Edition players and Java servers.
I've started implements Timings v2 to be able to send and analyze data on your app (with a bit of hacking)

But i faced a little problem, (probably because i haven't understand a thing or two) :

Result : https://timings.aikar.co/?id=8b8036b3ea9a41638d8fbf34b739724c

My first question is : can i use your app to do a such thing? I know you haven't agree i use your app like this, so, am I able to send my software timinigs to https://timings.aikar.co/ ?

My second question : what wrong i've made? and have you got an idea of what's going on?

Regards, a random user.

Tree mode view / hierarchical view mode

I've added many custom timings to TrainCarts to help in detecting performance issues. Without it, all people see is that EntityMinecart has a lot of tick time. It works wonderfully - the only problem is that the timings viewer offers no hierarchical view.

What I mean by that is that there is no parent-child relationship possible where children run in the timeslice of the parent. This sort of information would probably have to be stored in the timings reports themselves. If it has to be added to the library that generates the report and called manually specifying the parent timings node, that'd be fine with me too.

For example:
Image of timings report

What I'd like to see (mockup, not complete)
Mockup

I've named the entries like A - B - C so that the hierarchy is clear, but it lacks native support unfortunately. I'd love to see some form of tree hierarchical view with 'Train Physics', under it 'MinecartMember::onPhysicsPostMove()' with under that node a couple like 'onMove()' and 'MEMBER_MOVE'. Right now it seems as if the plugin is using huge amounts of tick time if you were to tally the numbers.

Having it hierarchical would also clean up the view itself.

Incorrect counts for expanded subsections

I believe this is related to PaperMC/Paper#2489 (see my comment there)

When you expand a section in the timings tab, the counts of the subsections are lower than they should be. For example, I took a 10 minute report in an empty world with a single player:
65835602-c9c8f500-e32b-11e9-8d87-3c16f47a8ce4
In this image, a 12000 tick window is highlighted. "Minecraft::world - entityTick" has a count of 12000, which is correct, however the subsection "Minecraft::tickEntity - nms.EntityPlayer" has a count of 6000, which is incorrect.

If you choose an 18000 tick window, any subsection has a count of 12000; for a 24000 tick window, any subsection has a count of 18000; etc. It's always 6000 ticks fewer than it should be. This only seems to affect the first layer down, i.e. subsections of subsections are fine.

Feature request: Display CPU model

Frequently performance issues are cause by anemic hardware,
being able to display the CPU model along side some other metrics like cores available to the JVM, enabled mitigations and current clocks would go a long way helping diagnose this.

UI Improvement - Table Layout

Hi there,

I find it really difficult to read through the numbers combined with letters and not being able to sort by values.
Is there a reason the data isn't displayed in a table format?

Atm it looks like this:

1. Current UI

Empire::Event: c.e.l.EmpireBlockListener (BlockPhysicsEvent) count(140612379) total(17.32% 69.665s, 19.77% of tick) avg(0.00ms per - 9.89ms/19,771.14 per tick)

2. Basic Table

Current layout converted into a table. (way more clear, easy to read, could be sort-able).

name total < < < avg < <
/\ calls totalPct totalTime pctOfTick avgMsPerCall totalMsPerTick callsPerTick
Empire::Event: c.e.l.EmpireBlockListener (BlockPhysicsEvent) 140,612,379 17.32% 69.665s 19.77% 0.00ms 9.89ms 19,771.14

3. Simplified Table

Going a step further by grouping the same data (different time unit).

name share time time/call calls
Empire::Event: c.e.l.EmpireBlockListener (BlockPhysicsEvent) 17.32% (19.77%/Tick) 69,665ms (9.89ms/Tick) 0.00ms 140,612,379 (19,771.14/Tick)

4. Smart Table

A further improvement - in terms of clean ui - the total/tick data toggle-able. So it only displays the total or avgPerTick values based upon a toggle button to switch between those two.

Total Time

name share time time/call calls
Empire::Event: c.e.l.EmpireBlockListener (BlockPhysicsEvent) 17.32% 69,665ms 0.00ms 140,612,379

Avg. per Tick

name share time time/call calls
Empire::Event: c.e.l.EmpireBlockListener (BlockPhysicsEvent) 19.77% 9.89ms 0.00ms 19,771.14

Missing data?

Hi,

As of recently, our servers been lagging quite alot, so we decided to check timings.

After loading and pasting timings, we noticed one thing. There seems to be alot of missing data, as quite well, nothing adds up for us.

The timings in question would be, http://timings.aikar.co/v2/?id=9f5d2d7f47b344859b564e3923e09448, as you can see its lagging. However the lag tab seems to make zero sense.

As you can see, the total %'s don't add up to 100% no matter how you look at it. For example, we have a 30% and 2 "15%" events near the top of the lag view. Which doesn't add up to 100% at all, no even close. And anything below that isn't relevant as it barely brings the total % any closer to 100%.

This basically means there's missing data from the looks of it, and I can't quite seem to find it. The issue also seems to effect the "all view" tab. Further confusing us.

If you can provide any insight on how to fix this, that would be awesome. (And yes, we have verbose off)

Thanks for reading,
Ryan - TitanicFreak

Create list view of JVM flags

-Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC is hard to read, and that is a short example. A list view is much easier to read:

  • -Xms4G
  • -Xmx4G
  • -XX:+UseG1GC
  • -XX:+ParallelRefProcEnabled
  • -XX:MaxGCPauseMillis=200
  • -XX:+UnlockExperimentalVMOptions
  • -XX:+DisableExplicitGC

Timings Graphics in browser not working

image

I am running Thermos 1.7.10 for the FTB Infinity Evolved Modpack

I installed thermos specifically so I could put 1-2 plugins and run some timings. The timings are printed out in the .txt just fine but when doing /timings paste or /timings report and using the provided link gives the image shown. Is this a bug? What's going wrong?

I can do timings just fine on my vanilla 1.12 server. Though this is obviously different, and is also on a VPS.

Private Regions Tab

If server owner has

timings:
  private-regions: true
  regions-password: XXXXXXX

in their paper config, ensure regions tab does not get sent to the client unless they enter a password

A secondary local supplied password should also allow viewing the regions tab so that Paper trusted dev team can view it to assist without asking the server owner for a password.
If a region password is not supplied, generate one and print it in the upload response.

Link provided by Paper doesn't work

When I do the /timings report command, paper gives me a link but the link doesn't exist
image

image

I'm on Paper 1.6.1-136
Plugins (25): ActionHealth*, AuthMe, BannerMaker, Chunkmaster, DeadChest, dynmap*, Essentials, EssentialsAntiBuild, EssentialsChat, EssentialsProtect, EssentialsSpawn, ImageOnMap, LuckPerms, LWC, LWCTrust, OpenInv, PlugMan, ProtocolLib, SetHomes*, SinglePlayerSleep, SkinsRestorer, Timber, Vault, WorldEdit, WorldGuard

Legacy support

I just wanted to paste the timings to the old site and saw that you removed that feature.
Would it be possible to bring that back as legacy support because a lot of people are still using Cauldron version without "/timings paste"

WebPack

Likely to go with #59, but update to latest webpack. But this could be done before #59

Timings graph not displaying data

Hello,

Ive been having an issue with my timing reports lately. The graph at the top does not always display data properly, i cant see the values that it would display in the tooltip.

It doesnt matter how long the server is running, or if i timings reset or not. https://timings.aikar.co/?id=932b788516474908969f5b535ddcf3fb

Paper 163
Ubuntu 18.04.2

Edit: Does a user need to be logged in at least once for timings to properly generate the report? I need to do more testing, but i usually do timings paste from the console and dont think i have ever had this issue before.

Colors are confusing.

https://timings.aikar.co/?id=edeb6ec5fe004dda9929004241737a15

Look at the first three points. It shows 19.42TPS, but yet reports a 56% TPS loss. I'm not sure where that percentage is coming from, but 20 TPS dropped to 19.42 is certainly not a 56% drop in TPS.

Also, the yellow line has blue dots, but both colors are in the legend:
At first glance, one would be led to believe that yellow = tile entities, per the legend. However, if you look at the numbers that correspond to the massive drop of the yellow line, you quickly realize that it's the blue dots that correspond to the blue color in the legend, which is Entities, not tile entities. It's very confusing to have both colors on that line when both colors are in the legend.

Where can I view V1 timing report?

Seems current version Timing viewer don't support the old version V1 timing report, yet I have some server still using 1.7.10 MCPC server, they only give me V1 timing report. How can I do or where can I find a lagacy Timing viewer repo.

Server crash

---- Minecraft Crash Report ----
// Everything's going to plan. No, really, that was supposed to happen.

Time: 7/20/20 11:11 AM
Description: Exception in server tick loop

java.lang.ClassCastException: �E£�(� cannot be cast to co.aikar.timings.TimingHandl
at co.aikar.timings.TimingsManager.tick(TimingsManager.java:77)
at co.aikar.timings.FullServerTickHandler.stopTiming(FullServerTickHandler.java:51)
at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:835)
at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:666)
at java.lang.Thread.run(Unknown Source)

Recommendations Tab: GC

Stub in the foundation for a Recommendations tab that provides human readable suggestions.

First task: Detect GC flags using standard Java GC and recommend my GC flags
Also detect CMS and print different wording that while CMS is overall ok, it has some flaws and still recommended to use my flags.

Detect if any old gen are occurring even with my flags ,and suggest getting more memory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.