https://github.com/openziti/goroutine-analyzer Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Changelog * Solutions + By Size + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} openziti / goroutine-analyzer Public * Notifications * Fork 1 * Star 73 Helps analyze goroutines. Inspired by TDA for Java and goroutine-inspect for golang. License Apache-2.0 license 73 stars 1 fork Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights openziti/goroutine-analyzer This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags 1 branch 1 tag Code * Clone HTTPS GitHub CLI [https://github.com/o] Use Git or checkout with SVN using the web URL. [gh repo clone openzi] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @plorenz plorenz Add doc (#2) ... d7f79ec Sep 15, 2022 Add doc (#2) * Add doc * Update for review comments * More review comments d7f79ec Git stats * 24 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github/workflows Add doc (#2) Sep 15, 2022 doc Add doc (#2) Sep 15, 2022 gradle/wrapper Improve multi-select behavior and tree manipulation. Add edit filter ... Feb 3, 2022 src Start testing release process Sep 14, 2022 .gitignore Initial code Oct 13, 2020 LICENSE Initial commit Oct 13, 2020 README.md Add doc (#2) Sep 15, 2022 TODO Add TODO Feb 3, 2022 build.gradle Start testing release process Sep 14, 2022 gradlew Initial code Oct 13, 2020 gradlew.bat Initial code Oct 13, 2020 jpackage-darwin.cfg Make input and dest paths os specific Sep 15, 2022 jpackage-linux.cfg Make input and dest paths os specific Sep 15, 2022 jpackage-windows.cfg Make input and dest paths os specific Sep 15, 2022 jpackage.cfg Make input and dest paths os specific Sep 15, 2022 settings.gradle Initial code Oct 13, 2020 version Start testing release process Sep 14, 2022 View code [ ] goroutine-analyzer Overview Installation How to use Opening Stack Dumps Auto-Sorting Goroutines Filtering Other Operations Thank you README.md goroutine-analyzer Overview This is a GUI tool for helping analyze golang goroutine dumps. It has the following features: * Working with multiple dumps * Grouping, extracting or hiding similar goroutines, either manually or automatically * Regex based grouping The tool was written to support production deployments of OpenZiti. It works well together with the agent library which supports debugging operations such as extracting stackdumps and getting pprof dumps. The tool is written in Java for expediency on the UI front. Installation Installers can be downloaded for the latest release at https:// github.com/openziti/goroutine-analyzer/releases/latest The following are available: * Windows x64 * MacOS x64 + MacOS M1 support will be provided once GitHub actions provides M1 runners. In the meantime, you can use an application bundle or just clone and run. * Linux .deb + rpm builds are currently unavailable as GitHub actions only provides ubuntu runners. If anyone is interested an appimage build would probably be straightforward to add. * Application bundles with start scripts if Java is pre-installed on your system The application can also be run from source by cloning the repository and running ./gradlew run. I run with Java 17, but it will likely work with older versions as well. How to use Opening Stack Dumps Stack dumps can be opened from the file system. Multiple can be selected, and more can be added to the open set at any time. Open Dialog Once opened, the stack dumps will be shown unfiltered. Here the set of routines has been expanded. Whatever goroutine group or individual goroutine has been selected will be shown in the window on the right. Initial View Auto-Sorting Goroutines Usually the first thing I'll do when looking at a stack dump is to group all the similar gorotines together. This can be done as follows: Extracting Duplicated Goroutines When the operation is complete, you'll see anything which is duplicated pulled out into its own group. Any unique goroutines will be left in the initial routines view. In order to group goroutines, they are compared ignoring any object pointers. As long as the methods and line numbers match up, they will be considered equivalent. Extract Duplicates Results Filtering Sometimes you want to find all goroutines related to a given package, method or pointer. You can do this with a filter. Create Filter Option A filter is specified using a regular expression and will be matched against the full text of each goroutine. Create Filter Any goroutines matching the regular expression will be placed into their own group. Create Filter Result After the filter is created, it can be edited or deleted. Other Operations In addition, if you're trying to narrow things down iteratively, you can select individual goroutines and perform the following operations. Other Operations * Group Goroutines Like This - find other goroutines like this and put them in a group, leaving them in the routines group * Hide Goroutine - hide this goroutine from view. Display of hidden goroutines can be toggle on and off at the group level * Unide Goroutine - show this goroutine again. Only displays for hidden goroutines * Hide Goroutines Like This - hides all goroutines matching this one * Separate Goroutines Like This - acts like the group option except that the goroutines are also removed from the current group. Thank you This tool was inspired by the following: * TDA (thread dump analyzer) - Original version at https://java.net /projects/tda doesn't seem to be available anymore * goroutine-inspect The build was helped along by this very helpful example repo from GitHub user sualeh About Helps analyze goroutines. Inspired by TDA for Java and goroutine-inspect for golang. Resources Readme License Apache-2.0 license Stars 73 stars Watchers 9 watching Forks 1 fork Releases 1 v1.0.0 Latest Sep 15, 2022 Packages 0 No packages published Languages * Java 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.