@Test public void testAdd() { System.out.println("add"); ThroughputVsThreadsGui instance = new ThroughputVsThreadsGui(); instance.add(new SampleResult()); instance.add(new SampleResult(0, 100)); instance.add(new SampleResult(0, 100)); }
@Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } long time = res.getTime(); if (time < 1) { return; } super.add(res); String label = res.getSampleLabel(); String averageLabel = "Average " + res.getSampleLabel(); GraphRowAverages row = (GraphRowAverages) model.get(label); GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel); if(row == null || avgRow == null) { row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL , false, false, false, true, false); avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG , false, true, false, false, row.getColor(), false); } int allThreads = getCurrentThreadCount(res); double throughput = (double) allThreads * 1000.0d / time; row.add(allThreads, throughput); avgRow.add(allThreads, throughput); graphPanel.getGraphObject().setCurrentX(allThreads); updateGui(null); }
ThroughputVsThreadsGui extends AbstractVsThreadVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } long time = res.getTime(); if (time < 1) { return; } super.add(res); String label = res.getSampleLabel(); String averageLabel = "Average " + res.getSampleLabel(); GraphRowAverages row = (GraphRowAverages) model.get(label); GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel); if(row == null || avgRow == null) { row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL , false, false, false, true, false); avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG , false, true, false, false, row.getColor(), false); } int allThreads = getCurrentThreadCount(res); double throughput = (double) allThreads * 1000.0d / time; row.add(allThreads, throughput); avgRow.add(allThreads, throughput); graphPanel.getGraphObject().setCurrentX(allThreads); updateGui(null); } }
ThroughputVsThreadsGui extends AbstractVsThreadVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } long time = res.getTime(); if (time < 1) { return; } super.add(res); String label = res.getSampleLabel(); String averageLabel = "Average " + res.getSampleLabel(); GraphRowAverages row = (GraphRowAverages) model.get(label); GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel); if(row == null || avgRow == null) { row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL , false, false, false, true, false); avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG , false, true, false, false, row.getColor(), false); } int allThreads = getCurrentThreadCount(res); double throughput = (double) allThreads * 1000.0d / time; row.add(allThreads, throughput); avgRow.add(allThreads, throughput); graphPanel.getGraphObject().setCurrentX(allThreads); updateGui(null); } ThroughputVsThreadsGui(); }
ThroughputVsThreadsGui extends AbstractVsThreadVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } long time = res.getTime(); if (time < 1) { return; } super.add(res); String label = res.getSampleLabel(); String averageLabel = "Average " + res.getSampleLabel(); GraphRowAverages row = (GraphRowAverages) model.get(label); GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel); if(row == null || avgRow == null) { row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL , false, false, false, true, false); avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG , false, true, false, false, row.getColor(), false); } int allThreads = getCurrentThreadCount(res); double throughput = (double) allThreads * 1000.0d / time; row.add(allThreads, throughput); avgRow.add(allThreads, throughput); graphPanel.getGraphObject().setCurrentX(allThreads); updateGui(null); } ThroughputVsThreadsGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void add(SampleResult res); @Override String getWikiPage(); }
ThroughputVsThreadsGui extends AbstractVsThreadVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } long time = res.getTime(); if (time < 1) { return; } super.add(res); String label = res.getSampleLabel(); String averageLabel = "Average " + res.getSampleLabel(); GraphRowAverages row = (GraphRowAverages) model.get(label); GraphRowOverallAverages avgRow = (GraphRowOverallAverages) model.get(averageLabel); if(row == null || avgRow == null) { row = (GraphRowAverages) getNewRow(model, AbstractGraphRow.ROW_AVERAGES, label, AbstractGraphRow.MARKER_SIZE_SMALL , false, false, false, true, false); avgRow = (GraphRowOverallAverages) getNewRow(model, AbstractGraphRow.ROW_OVERALL_AVERAGES, averageLabel, AbstractGraphRow.MARKER_SIZE_BIG , false, true, false, false, row.getColor(), false); } int allThreads = getCurrentThreadCount(res); double throughput = (double) allThreads * 1000.0d / time; row.add(allThreads, throughput); avgRow.add(allThreads, throughput); graphPanel.getGraphObject().setCurrentX(allThreads); updateGui(null); } ThroughputVsThreadsGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void add(SampleResult res); @Override String getWikiPage();  }