@Test public void testTestStarted() { System.out.println("testStarted"); String host = ""; PerfMonCollector instance = new PerfMonCollector(); instance.testStarted(host); }
@Override public void testStarted(String host) { if (!isWorkingHost(host)) { return; } if (getProperty(FILENAME) == null || getProperty(FILENAME).getStringValue().trim().length() == 0) { if (autoGenerateFiles) { setupSaving(getAutoFileName()); } else { try { File tmpFile = File.createTempFile("perfmon_", ".jtl"); tmpFile.delete(); setupSaving(tmpFile.getAbsolutePath()); } catch (IOException ex) { log.info("PerfMon metrics will not be recorded! Please run the test with -JforcePerfmonFile=true", ex); } } } log.debug("PerfMon metrics will be stored in " + getPropertyAsString(FILENAME)); if (!getSaveConfig().saveAsXml() && getSaveConfig().saveFieldNames()) { filesList.add(getPropertyAsString(FILENAME)); } else { log.warn("Perfmon file saving setting is not CSV with header line: " + getPropertyAsString(FILENAME)); } initiateConnectors(); workerThread = new Thread(this); workerThread.start(); super.testStarted(host); }
PerfMonCollector extends CorrectedResultCollector implements Runnable, PerfMonSampleGenerator { @Override public void testStarted(String host) { if (!isWorkingHost(host)) { return; } if (getProperty(FILENAME) == null || getProperty(FILENAME).getStringValue().trim().length() == 0) { if (autoGenerateFiles) { setupSaving(getAutoFileName()); } else { try { File tmpFile = File.createTempFile("perfmon_", ".jtl"); tmpFile.delete(); setupSaving(tmpFile.getAbsolutePath()); } catch (IOException ex) { log.info("PerfMon metrics will not be recorded! Please run the test with -JforcePerfmonFile=true", ex); } } } log.debug("PerfMon metrics will be stored in " + getPropertyAsString(FILENAME)); if (!getSaveConfig().saveAsXml() && getSaveConfig().saveFieldNames()) { filesList.add(getPropertyAsString(FILENAME)); } else { log.warn("Perfmon file saving setting is not CSV with header line: " + getPropertyAsString(FILENAME)); } initiateConnectors(); workerThread = new Thread(this); workerThread.start(); super.testStarted(host); } }
PerfMonCollector extends CorrectedResultCollector implements Runnable, PerfMonSampleGenerator { @Override public void testStarted(String host) { if (!isWorkingHost(host)) { return; } if (getProperty(FILENAME) == null || getProperty(FILENAME).getStringValue().trim().length() == 0) { if (autoGenerateFiles) { setupSaving(getAutoFileName()); } else { try { File tmpFile = File.createTempFile("perfmon_", ".jtl"); tmpFile.delete(); setupSaving(tmpFile.getAbsolutePath()); } catch (IOException ex) { log.info("PerfMon metrics will not be recorded! Please run the test with -JforcePerfmonFile=true", ex); } } } log.debug("PerfMon metrics will be stored in " + getPropertyAsString(FILENAME)); if (!getSaveConfig().saveAsXml() && getSaveConfig().saveFieldNames()) { filesList.add(getPropertyAsString(FILENAME)); } else { log.warn("Perfmon file saving setting is not CSV with header line: " + getPropertyAsString(FILENAME)); } initiateConnectors(); workerThread = new Thread(this); workerThread.start(); super.testStarted(host); } PerfMonCollector(); }
PerfMonCollector extends CorrectedResultCollector implements Runnable, PerfMonSampleGenerator { @Override public void testStarted(String host) { if (!isWorkingHost(host)) { return; } if (getProperty(FILENAME) == null || getProperty(FILENAME).getStringValue().trim().length() == 0) { if (autoGenerateFiles) { setupSaving(getAutoFileName()); } else { try { File tmpFile = File.createTempFile("perfmon_", ".jtl"); tmpFile.delete(); setupSaving(tmpFile.getAbsolutePath()); } catch (IOException ex) { log.info("PerfMon metrics will not be recorded! Please run the test with -JforcePerfmonFile=true", ex); } } } log.debug("PerfMon metrics will be stored in " + getPropertyAsString(FILENAME)); if (!getSaveConfig().saveAsXml() && getSaveConfig().saveFieldNames()) { filesList.add(getPropertyAsString(FILENAME)); } else { log.warn("Perfmon file saving setting is not CSV with header line: " + getPropertyAsString(FILENAME)); } initiateConnectors(); workerThread = new Thread(this); workerThread.start(); super.testStarted(host); } PerfMonCollector(); void setData(CollectionProperty rows); JMeterProperty getMetricSettings(); void sampleOccurred(SampleEvent event); @Override synchronized void run(); @Override void testStarted(String host); @Override void testEnded(String host); @Override void generateSample(double value, String label); @Override void generateErrorSample(String label, String errorMsg); @Override void generate2Samples(long[] values, String label1, String label2); @Override void generate2Samples(long[] values, String label1, String label2, double dividingFactor); static LinkedList<String> getFiles(); static void clearFiles(); }
PerfMonCollector extends CorrectedResultCollector implements Runnable, PerfMonSampleGenerator { @Override public void testStarted(String host) { if (!isWorkingHost(host)) { return; } if (getProperty(FILENAME) == null || getProperty(FILENAME).getStringValue().trim().length() == 0) { if (autoGenerateFiles) { setupSaving(getAutoFileName()); } else { try { File tmpFile = File.createTempFile("perfmon_", ".jtl"); tmpFile.delete(); setupSaving(tmpFile.getAbsolutePath()); } catch (IOException ex) { log.info("PerfMon metrics will not be recorded! Please run the test with -JforcePerfmonFile=true", ex); } } } log.debug("PerfMon metrics will be stored in " + getPropertyAsString(FILENAME)); if (!getSaveConfig().saveAsXml() && getSaveConfig().saveFieldNames()) { filesList.add(getPropertyAsString(FILENAME)); } else { log.warn("Perfmon file saving setting is not CSV with header line: " + getPropertyAsString(FILENAME)); } initiateConnectors(); workerThread = new Thread(this); workerThread.start(); super.testStarted(host); } PerfMonCollector(); void setData(CollectionProperty rows); JMeterProperty getMetricSettings(); void sampleOccurred(SampleEvent event); @Override synchronized void run(); @Override void testStarted(String host); @Override void testEnded(String host); @Override void generateSample(double value, String label); @Override void generateErrorSample(String label, String errorMsg); @Override void generate2Samples(long[] values, String label1, String label2); @Override void generate2Samples(long[] values, String label1, String label2, double dividingFactor); static LinkedList<String> getFiles(); static void clearFiles(); static final String DATA_PROPERTY; }