@Test public void testAdd() { System.out.println("add"); SampleResult res = new SampleResult(); res.sampleStart(); res.setAllThreads(1); res.setThreadName("test 1-2"); res.sampleEnd(); instance.add(res); try { Thread.sleep(2000); } catch (InterruptedException ex) { Logger.getLogger(ThreadsStateOverTimeGuiTest.class.getName()).log(Level.SEVERE, null, ex); } SampleResult res2 = new SampleResult(res); res2.setAllThreads(1); res2.setThreadName("test 1-2"); instance.add(res); }
@Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } super.add(res); String threadName = res.getThreadName(); threadName = threadName.lastIndexOf(" ") >= 0 ? threadName.substring(0, threadName.lastIndexOf(" ")) : threadName; long timeForAgg = Math.max(getGranulation(), res.getTime()); addThreadGroupRecord(threadName, normalizeTime(res.getEndTime()), res.getGroupThreads(), timeForAgg); updateGui(null); }
ThreadsStateOverTimeGui extends AbstractOverTimeVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } super.add(res); String threadName = res.getThreadName(); threadName = threadName.lastIndexOf(" ") >= 0 ? threadName.substring(0, threadName.lastIndexOf(" ")) : threadName; long timeForAgg = Math.max(getGranulation(), res.getTime()); addThreadGroupRecord(threadName, normalizeTime(res.getEndTime()), res.getGroupThreads(), timeForAgg); updateGui(null); } }
ThreadsStateOverTimeGui extends AbstractOverTimeVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } super.add(res); String threadName = res.getThreadName(); threadName = threadName.lastIndexOf(" ") >= 0 ? threadName.substring(0, threadName.lastIndexOf(" ")) : threadName; long timeForAgg = Math.max(getGranulation(), res.getTime()); addThreadGroupRecord(threadName, normalizeTime(res.getEndTime()), res.getGroupThreads(), timeForAgg); updateGui(null); } ThreadsStateOverTimeGui(); }
ThreadsStateOverTimeGui extends AbstractOverTimeVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } super.add(res); String threadName = res.getThreadName(); threadName = threadName.lastIndexOf(" ") >= 0 ? threadName.substring(0, threadName.lastIndexOf(" ")) : threadName; long timeForAgg = Math.max(getGranulation(), res.getTime()); addThreadGroupRecord(threadName, normalizeTime(res.getEndTime()), res.getGroupThreads(), timeForAgg); updateGui(null); } ThreadsStateOverTimeGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void add(SampleResult res); @Override String getWikiPage(); }
ThreadsStateOverTimeGui extends AbstractOverTimeVisualizer { @Override public void add(SampleResult res) { if (!isSampleIncluded(res)) { return; } super.add(res); String threadName = res.getThreadName(); threadName = threadName.lastIndexOf(" ") >= 0 ? threadName.substring(0, threadName.lastIndexOf(" ")) : threadName; long timeForAgg = Math.max(getGranulation(), res.getTime()); addThreadGroupRecord(threadName, normalizeTime(res.getEndTime()), res.getGroupThreads(), timeForAgg); updateGui(null); } ThreadsStateOverTimeGui(); @Override String getLabelResource(); @Override String getStaticLabel(); @Override void add(SampleResult res); @Override String getWikiPage();  }