Git Product home page Git Product logo

watson's Introduction

Watson

About the project

Watson is a JVM thread dump and CPU usage analyzer.

It combines the best features of other popular Java TDAs and optionally hides a lot of noise, like idle Tomcat threads waiting for work.

Screenshots

Open markdown file with screenshots

Gathering thread dumps

To fully leverage Watson, you should capture Java thread dump and top outputs.

The easiest way to do this is to generate a support zip and load files from the jfr-bundle/atst_in_product_diagnostic_<timestamp>/threaddumps directory.

You can also manually collect the data (also for non-Atlassian applications) by using Atlassian Support scripts.

Development

You only need yarn installed on your machine.

Available scripts

In the root project directory, you can run:

yarn install

Installs the required packages. Must be done prior to yarn start

yarn start

Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

yarn lint

Runs the linter to check if coding rules are followed.

yarn test

Launches the test runner in the interactive watch mode.

yarn deploy

Deploys the app to GitHub pages. Requires commit rights to the gh-pages branch.

watson's People

Contributors

alexgallien avatar arturjoshi-atlassian avatar deniseunt avatar dependabot[bot] avatar drauf avatar mmrowek avatar pweso avatar vlbaluk 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

Watchers

 avatar  avatar  avatar

watson's Issues

Fix tooltips on threads overview page

The tooltips look good on Firefox, but they are aligned wrong on Safari and Chrome.

Possible solutions:

  • fix CSS,
  • create some JS-only tooltips,
  • use some external library (tooltips from Atlaskit didn't work properly).

Cover the parser with tests

Some options:

  • parse real files and treat the parser as a black-box
  • refactor some code and test particular methods

Improve JFR support

Support zips now contain an output from JFR but currently Watson has only a very limited support for it, i.e. one additional version of CPU consumers page that offers a subset of features of the old view.

Since JFR data contains some cpu utilisation stuff the support can be much better

Flame graph

Add a flame graph page, filterable (e.g. by thread name, contains in stack + "Show only starting from...")

Add automatic analyses/diagnostics

Add some analysis of the problems we often see, e.g. many threads stuck waiting for the DB, full code cache, crashed reindex thread, ...

Loading multiple files with multiple thread dumps doesn't work

Currently, Watson recognizes either uploading a single file with multiple thread dumps inside, or uploading multiple files with a single thread dump.

When a user tries to upload a set of files with multiple thread dumps in each, the app doesn't do anything.

Reduce the length of the file with screenshots

It's unnecessarily long, I was too excited with screenshots from visual regression tests that I added too many. :)

One screenshot is enough for most pages, there should be at most two per page.

Make navbar float

The navbar should always float on top of the page, to make it easy to switch tabs after scrolling down

Nice to have: shorten titles of pages, add an icon to the "load another", replace "Issue tracker" and "Source code" with a single link to GitHub

De-selecting and re-selecting a label breaks pages

On pages that have some settings as labels, de-selecting and then re-selecting an option breaks the page:

  • a different set of data is showed (most notably - new columns are added on the threads overview page)
  • some functionality gets broken, e.g. opening thread details in a new window

Opening the page again fixes the issue. The problem reproduces 100% of the time

Inaccurate memory usage chart for various data formats

I've identified issues in watson's memory usage chart regarding the handling of memory data in different formats:

  1. Handling MiB unit: The chart inaccurately represents MiB data from top. The top tool in Linux systems uses MiB or KiB based on the version and configuration. Older versions typically use KiB, while newer ones may use MiB. Users can also toggle between MiB and KiB in top settings. This variation affects the chart's accuracy. Sample MiB data for reproduction:
    MiB Mem : 386945.3 total, 254444.5 free, 92777.0 used, 39723.8 buff/cache

  2. Data with '+' sign: The + sign in used memory data leads to inaccurate chart representation. The chart shows that all memory is used. Used memory is not rendered.
    KiB Mem : 65171004 total, 3210764 free, 21277416+used, 40682824 buff/cache

  3. Inaccurate KiB memory conversion: The current method simplifies conversion, assuming 1 GB equals 1 000 000 KiB and 1 MB equals 1000 KiB, which is inaccurate. The correct conversion should be 1 GB equals 1024 * 1024 KiB, and 1 MB equals 1024 KiB.

Re-write types to be immutable

This will require adjusting the parser, and maybe some components. Thankfully all required changes should result in typescript compile-time errors

Improve handling of top outputs w/o linked thread dumps

If there are top outputs loaded without a corresponding thread dumps, some pages are cluttered with useless columns.

To be precise:

  • the threads overview page shows empty columns,
  • stuck threads page incorrectly sets the default value for "Minimal similar stacks to consider a thread stuck" (it's bigger than the number of thread dumps loaded, so it will always be false),
  • CPU consumers page shows columns filled only with "--".

The summary page shows some "unknown time" entries on the X-axis which could be improved too.

Similar threads page works without any issues.

Discovered when fixing #10

New filter on threads overview page: long running threads

Achieve something similar to the regexp below:

grep -E -h '^"http.*-exec-[0-9]+' jira_threads.* | sed 's/"//g' | sort -k1,1 -s | grep -E " runnable | Object.wait\(\) | monitor " | awk '{print $1, $2, $3}' | uniq -c | awk '($1 >= 2) {print}' | sort -nr

Basically, only display threads that are running for 2+ consecutive windows. The filter can be useful especially for thread dumps with hundreds+ of threads or a huge number of dumps where it's not easy to visually scan everything.

Improve the looks of thread details window

It's the pop-up that opens when you e.g. click on a CPU usage or the line from the stack in Threads Overview. It's just ugly at the moment.

I don't have any vision about how it should look.

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.