-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
command line only mode #4
Comments
This mode should include the feature of exporting the graph (as image - GIF/PNG) in addition to CSV data. |
Command line mode should not not depend on any GUI component to run : That is should be able to run in a non interative session/shell. This would allow to use it in automated builds/test suites. |
I agree. |
I have a java class that takes a gc.log filename and prints some information (throughput, max used mem after gc, total gc'ed mem) on System.out using GCViewer classes. Here is my source code : import com.tagtraum.perf.gcviewer.*; import java.io.FileInputStream; import java.io.File; import java.util.logging.Logger; import java.util.logging.Level; import java.util.Locale; public class GCLogStatistics { private final GCLogStatistics i = null; private static final DataReaderFactory factory = new DataReaderFactory(); public static void main (String args[]) { if (args == null || args.length != 1) { System.out.println("Usage: GCLogStatistics gc.log"); return; } GCLogStatistics i = new GCLogStatistics(args[0]); } GCLogStatistics(String filename) { try { final File f = new File(filename); final FileInputStream in = new FileInputStream(f); final DataReader reader = factory.getDataReader(in); final GCModel model = reader.read(); System.out.printf(Locale.US,"THROUGHPUT:%2.2f\n",model.getThroughput()); System.out.println("MAXUSEDMEM:"+model.getPostFullGCUsedMemory().getMax()); System.out.println("TOTALGCEDMEM:"+model.getFreedMemory()); } catch (Exception e ) { System.err.println (e.toString ()); } } } |
Hi David, Thank you for this sample. There is another user working on this issue (pbilstein). His approach extracts more information. When he releases his code I'll have to see how I can combine the two different approaches. Regards, Jörg |
GCViewer should be have a command line only mode so that no interaction is required to process a gc log file. This mode would allow the use of gcviewer in automated scripts.
Add option to support export of graph as image.
The text was updated successfully, but these errors were encountered: