@Test public void testAdd() { System.out.println("add"); SampleResult res = new SampleResult(); res.setAllThreads(1); res.setThreadName("test 1-2"); res.setResponseData("aa=10\nbb=20"); PageDataExtractorOverTimeGui instance = new PageDataExtractorOverTimeGui(); instance.add(res); }
@Override public void add(SampleResult res) { super.add(res); if (regExps == null && cmdRegExps == null) { return; } String pageBody = res.getResponseDataAsString(); long time = normalizeTime(res.getEndTime()); if (cmdRegExps == null) { PropertyIterator iter = regExps.iterator(); while (iter.hasNext()) { CollectionProperty props = (CollectionProperty) iter.next(); String label = props.get(0).getStringValue(); String regExpValue = props.get(1).getStringValue(); Boolean isDelta = props.get(2).getBooleanValue(); Boolean isLabelRegExp = props.get(3).getBooleanValue(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } else { Iterator<Object> regExpIter = cmdRegExps.iterator(); while (regExpIter.hasNext()) { String label = (String) regExpIter.next(); String regExpValue = (String) regExpIter.next(); boolean isDelta = (Boolean) regExpIter.next(); boolean isLabelRegExp = (Boolean) regExpIter.next(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } updateGui(null); }
PageDataExtractorOverTimeGui extends AbstractOverTimeVisualizer implements CMDLineArgumentsProcessor { @Override public void add(SampleResult res) { super.add(res); if (regExps == null && cmdRegExps == null) { return; } String pageBody = res.getResponseDataAsString(); long time = normalizeTime(res.getEndTime()); if (cmdRegExps == null) { PropertyIterator iter = regExps.iterator(); while (iter.hasNext()) { CollectionProperty props = (CollectionProperty) iter.next(); String label = props.get(0).getStringValue(); String regExpValue = props.get(1).getStringValue(); Boolean isDelta = props.get(2).getBooleanValue(); Boolean isLabelRegExp = props.get(3).getBooleanValue(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } else { Iterator<Object> regExpIter = cmdRegExps.iterator(); while (regExpIter.hasNext()) { String label = (String) regExpIter.next(); String regExpValue = (String) regExpIter.next(); boolean isDelta = (Boolean) regExpIter.next(); boolean isLabelRegExp = (Boolean) regExpIter.next(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } updateGui(null); } }
PageDataExtractorOverTimeGui extends AbstractOverTimeVisualizer implements CMDLineArgumentsProcessor { @Override public void add(SampleResult res) { super.add(res); if (regExps == null && cmdRegExps == null) { return; } String pageBody = res.getResponseDataAsString(); long time = normalizeTime(res.getEndTime()); if (cmdRegExps == null) { PropertyIterator iter = regExps.iterator(); while (iter.hasNext()) { CollectionProperty props = (CollectionProperty) iter.next(); String label = props.get(0).getStringValue(); String regExpValue = props.get(1).getStringValue(); Boolean isDelta = props.get(2).getBooleanValue(); Boolean isLabelRegExp = props.get(3).getBooleanValue(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } else { Iterator<Object> regExpIter = cmdRegExps.iterator(); while (regExpIter.hasNext()) { String label = (String) regExpIter.next(); String regExpValue = (String) regExpIter.next(); boolean isDelta = (Boolean) regExpIter.next(); boolean isLabelRegExp = (Boolean) regExpIter.next(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } updateGui(null); } PageDataExtractorOverTimeGui(); }
PageDataExtractorOverTimeGui extends AbstractOverTimeVisualizer implements CMDLineArgumentsProcessor { @Override public void add(SampleResult res) { super.add(res); if (regExps == null && cmdRegExps == null) { return; } String pageBody = res.getResponseDataAsString(); long time = normalizeTime(res.getEndTime()); if (cmdRegExps == null) { PropertyIterator iter = regExps.iterator(); while (iter.hasNext()) { CollectionProperty props = (CollectionProperty) iter.next(); String label = props.get(0).getStringValue(); String regExpValue = props.get(1).getStringValue(); Boolean isDelta = props.get(2).getBooleanValue(); Boolean isLabelRegExp = props.get(3).getBooleanValue(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } else { Iterator<Object> regExpIter = cmdRegExps.iterator(); while (regExpIter.hasNext()) { String label = (String) regExpIter.next(); String regExpValue = (String) regExpIter.next(); boolean isDelta = (Boolean) regExpIter.next(); boolean isLabelRegExp = (Boolean) regExpIter.next(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } updateGui(null); } PageDataExtractorOverTimeGui(); @Override String getStaticLabel(); @Override String getLabelResource(); @Override String getWikiPage(); @Override TestElement createTestElement(); @Override void modifyTestElement(TestElement te); @Override void configure(TestElement te); @Override void add(SampleResult res); @Override void clearData(); void processCMDOption(String nextArg, ListIterator args); }
PageDataExtractorOverTimeGui extends AbstractOverTimeVisualizer implements CMDLineArgumentsProcessor { @Override public void add(SampleResult res) { super.add(res); if (regExps == null && cmdRegExps == null) { return; } String pageBody = res.getResponseDataAsString(); long time = normalizeTime(res.getEndTime()); if (cmdRegExps == null) { PropertyIterator iter = regExps.iterator(); while (iter.hasNext()) { CollectionProperty props = (CollectionProperty) iter.next(); String label = props.get(0).getStringValue(); String regExpValue = props.get(1).getStringValue(); Boolean isDelta = props.get(2).getBooleanValue(); Boolean isLabelRegExp = props.get(3).getBooleanValue(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } else { Iterator<Object> regExpIter = cmdRegExps.iterator(); while (regExpIter.hasNext()) { String label = (String) regExpIter.next(); String regExpValue = (String) regExpIter.next(); boolean isDelta = (Boolean) regExpIter.next(); boolean isLabelRegExp = (Boolean) regExpIter.next(); if (isLabelRegExp) { processPageRegExpLabel(pageBody, label, regExpValue, isDelta, time); } else { processPageLabel(pageBody, label, regExpValue, isDelta, time); } } } updateGui(null); } PageDataExtractorOverTimeGui(); @Override String getStaticLabel(); @Override String getLabelResource(); @Override String getWikiPage(); @Override TestElement createTestElement(); @Override void modifyTestElement(TestElement te); @Override void configure(TestElement te); @Override void add(SampleResult res); @Override void clearData(); void processCMDOption(String nextArg, ListIterator args); static final String[] columnIdentifiers; static final Class[] columnClasses; }