DataViewComponent.MasterViewConfiguration masterConfiguration =
new DataViewComponent.MasterViewConfiguration(false);
dvc = new DataViewComponent(masterView, masterConfiguration);
SimpleXYChartSupport pauseChart = createChart(DataTypeEnum.DECIMAL, ChartTypeEnum.LINE, "GC pause times",
new String[]{"Minor GC pause", "Major GC pause"}, "<html>Time</html>", "<html>GC pause in \u00B5s</html>",
new String[]{GcDataCollector.MINOR_GC_TIME_KEY, GcDataCollector.MAJOR_GC_TIME_KEY});
dvc.addDetailsView(new DataViewComponent.DetailsView("Gc pause times", "description", 0, pauseChart.getChart(), null), DataViewComponent.TOP_LEFT);
SimpleXYChartSupport survivorChart = createChart(DataTypeEnum.BYTES, ChartTypeEnum.LINE, "Promoted vs Survived",
new String[]{"Promoted", "Survived"}, "<html>Time</html>", "<html>Bytes</html>",
new String[]{GcDataCollector.PROMOTED_KEY, GcDataCollector.SURVIVED_KEY});
dvc.addDetailsView(new DataViewComponent.DetailsView("Promoted vs Survived", "description", 0, survivorChart.getChart(), null), DataViewComponent.TOP_RIGHT);
SimpleXYChartSupport gcCostChart = createChart(DataTypeEnum.DECIMAL, ChartTypeEnum.LINE, "GC cost",
new String[]{"Minor GC cost", "Major GC cost"}, "<html>Time</html>", "<html>Cost</html>",
new String[]{GcDataCollector.MINOR_COST_KEY, GcDataCollector.MAJOR_COST_KEY});
dvc.addDetailsView(new DataViewComponent.DetailsView("GC cost", "description", 0, gcCostChart.getChart(), null), DataViewComponent.BOTTOM_LEFT);
SimpleXYChartSupport freeLiveChart = createChart(DataTypeEnum.BYTES, ChartTypeEnum.LINE, "Free & live space",
new String[]{"Free space", "Live space"}, "<html>Time</html>", "<html>Bytes</html>",
new String[]{GcDataCollector.FREE_SPACE_KEY, GcDataCollector.LIVE_SPACE_KEY});
dvc.addDetailsView(new DataViewComponent.DetailsView("Free & live space", "description", 0, freeLiveChart.getChart(), null), DataViewComponent.BOTTOM_RIGHT);
final JvmstatModel model = JvmstatModelFactory.getJvmstatFor(application);
final GcPauseMonitor monitor = new GcPauseMonitor(new GcDataCollector(model, charts));
new Thread(monitor).start();