Available on GitHub and offered under the MIT license, GCToolkit parses log files into discrete events and has an API for aggregating data from those events. Users can create arbitrary and complex analyses of the state of managed memory in the JVM, as shown by the Java GC log.

Unveiled in early August, GCToolkit is comprised of three Java modules that cover the API, GC log file parsers, and a message backplane based on the Vert.x toolkit for building reactive applications on the JVM. The API module is the entry point into the toolkit, hiding the details of using the parser and Vert.x to analyze a GC log file into a few method calls. The parser module is a collection of regular expressions and code developed to be a robust GC log parser.

The Vert. x-based messaging backplane makes use of two message buses. The first streams log lines from the GC file. Listeners on this bus are parsers that convert data from the data source into events that represent either a GC cycle or safe point. These events then are published on the second message bus. The listeners on this event bus then process the events that are of interest to them.

The parser emits discrete JVM events that make it possible to write code to capture and analyze data from those events. Data to be analyzed depends on what developers want to look at. GCToolkit has an aggregator/aggregation framework for capturing and analyzing GC log file data. Code that captures an event is called an aggregator, while code that analyzes data is called an aggregation.

Developers interested in contributing to GCToolkit can participate in online discussions about the project. The open-sourcing of Microsoft’s Java GC project comes in the wake of the company producing its own Java distribution, Microsoft Build of OpenJDK, in May. The company also has supported Java development on the Microsoft Azure cloud.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , ,
Nikoleta Yanakieva Editor at DevStyleR International