public DistributedRunner(Properties props) { remoteProps = props; retriesNumber = JMeterUtils.getPropDefault(RETRIES_NUMBER, 1); continueOnFail = JMeterUtils.getPropDefault(CONTINUE_ON_FAIL, false); retriesDelay = JMeterUtils.getPropDefault(RETRIES_DELAY, 5000); }
/** * Determine whether we are in 'expert' mode. Certain features may be hidden * from user's view unless in expert mode. * * @return true if we're in expert mode */ public static boolean isExpertMode() { return JMeterUtils.getPropDefault(EXPERT_MODE_PROPERTY, false); }
/** * Provide info, whether we run in HiDPI mode * @return {@code true} if we run in HiDPI mode, {@code false} otherwise */ public static boolean getHiDPIMode() { return JMeterUtils.getPropDefault("jmeter.hidpi.mode", false); // $NON-NLS-1$ }
/** * Provide info about the HiDPI scale factor * @return the factor by which we should scale elements for HiDPI mode */ public static double getHiDPIScaleFactor() { return Double.parseDouble(JMeterUtils.getPropDefault("jmeter.hidpi.scale.factor", "1.0")); // $NON-NLS-1$ $NON-NLS-2$ }
private BlockingQueue<Object> getFifo(String fifoName) { if (super.containsKey(fifoName)) { return super.get(fifoName); } else { BlockingQueue<Object> fifo = new LinkedBlockingQueue<Object>(JMeterUtils.getPropDefault(FifoMap.CAPACITY_PROP, Integer.MAX_VALUE)); super.put(fifoName, fifo); return fifo; } }
private BlockingQueue<Object> getFifo(String fifoName) { if (super.containsKey(fifoName)) { return super.get(fifoName); } else { BlockingQueue<Object> fifo = new LinkedBlockingQueue<Object>(JMeterUtils.getPropDefault(FifoMap.CAPACITY_PROP, Integer.MAX_VALUE)); super.put(fifoName, fifo); return fifo; } }
private List<String> getRemoteHosts() { String remoteHostsString = JMeterUtils.getPropDefault(REMOTE_HOSTS, LOCAL_HOST); StringTokenizer st = new StringTokenizer(remoteHostsString, REMOTE_HOSTS_SEPARATOR); List<String> list = new LinkedList<>(); while (st.hasMoreElements()) { list.add((String) st.nextElement()); } return list; }
private static Set<String> classesToSkip() { return Arrays.stream(JMeterUtils.getPropDefault("not_in_menu", "").split(",")) .map(String::trim) .collect(Collectors.toSet()); }
/** * Constructs a MailerModel. */ public MailerModel() { super(); setProperty(SUCCESS_LIMIT_KEY, JMeterUtils.getPropDefault("mailer.successlimit", DEFAULT_LIMIT)); //$NON-NLS-1$ setProperty(FAILURE_LIMIT_KEY, JMeterUtils.getPropDefault("mailer.failurelimit", DEFAULT_LIMIT)); //$NON-NLS-1$ }
/** * Get the mains file encoding * list from https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html * @return a String[] with the list of file encoding */ private String[] getListFileEncoding() { return JOrphanUtils.split(JMeterUtils.getPropDefault("csvdataset.file.encoding_list", ""), "|"); //$NON-NLS-1$ } }
public HttpSimpleTableControl() { setPort(JMeterUtils.getPropDefault("jmeterPlugin.sts.port", DEFAULT_PORT)); setTimestamp(JMeterUtils.getPropDefault( "jmeterPlugin.sts.addTimestamp", DEFAULT_TIMESTAMP)); setDataDir(JMeterUtils.getPropDefault( "jmeterPlugin.sts.datasetDirectory", DEFAULT_DATA_DIR)); }
public HttpSimpleTableControl() { setPort(JMeterUtils.getPropDefault("jmeterPlugin.sts.port", DEFAULT_PORT)); setTimestamp(JMeterUtils.getPropDefault( "jmeterPlugin.sts.addTimestamp", DEFAULT_TIMESTAMP)); setDataDir(JMeterUtils.getPropDefault( "jmeterPlugin.sts.datasetDirectory", DEFAULT_DATA_DIR)); }
public AbstractIPSampler() { //recvBuf = ByteBuffer.allocateDirect(JMeterUtils.getPropDefault(RECV_BUFFER_LEN_PROPERTY, 1024 * 4)); recvDataLimit = JMeterUtils.getPropDefault(RESULT_DATA_LIMIT, Integer.MAX_VALUE); if (recvDataLimit < Integer.MAX_VALUE) { log.info("Limiting result data to " + recvDataLimit); } }
public InfiniteGetTCPClientImpl() { super(); recvDataLimit = JMeterUtils.getPropDefault(AbstractIPSampler.RESULT_DATA_LIMIT, Integer.MAX_VALUE); if (recvDataLimit < Integer.MAX_VALUE) { log.info("Limiting result data to " + recvDataLimit); } }
public AbstractIPSampler() { //recvBuf = ByteBuffer.allocateDirect(JMeterUtils.getPropDefault(RECV_BUFFER_LEN_PROPERTY, 1024 * 4)); recvDataLimit = JMeterUtils.getPropDefault(RESULT_DATA_LIMIT, Integer.MAX_VALUE); if (recvDataLimit < Integer.MAX_VALUE) { log.info("Limiting result data to " + recvDataLimit); } }
/** * Get the list of JDBC driver classname for the main databases * @return a String[] with the list of JDBC driver classname */ private String[] getListJDBCDriverClass() { return JOrphanUtils.split(JMeterUtils.getPropDefault("jdbc.config.jdbc.driver.class", ""), "|"); //$NON-NLS-1$ }
/** * Get the check queries for the main databases * Based in https://stackoverflow.com/questions/10684244/dbcp-validationquery-for-different-databases * @return a String[] with the list of check queries */ private String[] getListCheckQuery() { return JOrphanUtils.split(JMeterUtils.getPropDefault("jdbc.config.check.query", ""), "|"); //$NON-NLS-1$ }
private static File getSaveServiceFile() { String saveServiceProps = JMeterUtils.getPropDefault(SAVESERVICE_PROPERTIES,SAVESERVICE_PROPERTIES_FILE); //$NON-NLS-1$ if (saveServiceProps.length() > 0){ //$NON-NLS-1$ return JMeterUtils.findFile(saveServiceProps); } throw new IllegalStateException("Could not find file configured in saveservice_properties property set to:"+saveServiceProps); }
/** * Gets defined JMeter mode. * @return the defined window mode */ public static WindowMode get() { String name = JMeterUtils.getPropDefault("backend_metrics_window_mode", FIXED.name()); return WindowMode.valueOf(name.toUpperCase()); } }
@Override public TestElement createTestElement() { String srv_list = JMeterUtils.getPropDefault(DistributedTestControl.PROP_HOSTS, "127.0.0.1"); ArrayList<String> data = new ArrayList<String>(Arrays.asList(srv_list.split(","))); for (String srv_name : data) { serversPanel.add(srv_name); } DistributedTestControl control = new DistributedTestControl(); control.setData(data); modifyTestElement(control); return control; }