explaingit

chewiebug/gcviewer

4,636JavaAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A desktop tool for Java developers that reads JVM garbage collection log files and displays them as charts showing memory usage, pause durations, and throughput over time.

Mindmap

mindmap
  root((repo))
    What it does
      Visualize GC logs
      Chart memory usage
      Measure pause times
    Key Metrics
      Throughput percent
      Average pause
      Peak memory
    Output Modes
      Desktop chart GUI
      CSV report
      Plain text summary
    Supported JVMs
      Oracle JDK 6 to 8
      OpenJDK 9 and 10
      IBM JDK
      G1 collector
    License
      GNU LGPL
      Fork of original
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Diagnose why a Java app has unpredictable performance spikes by visualizing GC pause duration over time.

USE CASE 2

Measure application throughput, the percentage of time not spent on garbage collection, from a production log file.

USE CASE 3

Generate a CSV summary of GC statistics from a log file for automated performance regression testing.

USE CASE 4

Identify memory leaks by watching whether heap usage after each full GC is trending upward over time.

Tech stack

Java

Getting it running

Difficulty · easy Time to first run · 5min
Free to use including in commercial software, if you modify GCViewer itself, share those changes under LGPL.

In plain English

GCViewer is a free desktop tool for Java developers who need to understand what their application's memory cleanup is doing. Java programs periodically run a process called garbage collection to reclaim memory that is no longer being used. When something goes wrong, or when performance feels sluggish, the JVM (the program that runs Java code) can write a log file describing every cleanup event. GCViewer reads those log files and turns them into charts and statistics. The main view is a chart that plots memory usage over time. Different colored lines and rectangles represent different types of cleanup events: full cleanups that pause the whole application are shown in black, while background cleanup work appears in other colors. You can see at a glance how much memory the application was using, how often pauses occurred, and how long each pause lasted. There are also tabs showing a detailed event list and any warnings the parser found while reading the log. The data panel alongside the chart gives you numbers: total memory allocated, average pause duration, pause frequency, throughput (the percentage of time the application was actually running rather than pausing for cleanup), and several other metrics. Values with a high spread are grayed out to signal that the average alone is not meaningful. You can run GCViewer as a desktop application by double-clicking the jar file, or from the command line to produce a CSV or plain-text summary report, optionally with a chart image. It supports log files from a wide range of JVM vendors and versions, including Oracle JDK 1.6 through 1.8, OpenJDK 9 and 10, IBM JDK, HP-UX JDK, and BEA JRockit. The project is a fork of the original GCViewer by Hendrik Schreiber, which stopped receiving updates in 2008. This fork continued development to add support for newer Java versions and garbage collectors, including the G1 collector introduced in Java 7. It is released under the GNU LGPL license.

Copy-paste prompts

Prompt 1
How do I enable GC logging in Java 8 and Java 11 to produce a log file that GCViewer can read?
Prompt 2
Open a GC log in GCViewer and explain what the black rectangles in the chart represent.
Prompt 3
Run GCViewer from the command line to produce a CSV report of pause times from my app gc.log file.
Prompt 4
What does a high spread on the average pause duration metric in GCViewer mean for my application?
Prompt 5
How do I use GCViewer to compare two GC log files from before and after a JVM tuning change?
Open on GitHub → Explain another repo

← chewiebug on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.