Package net.grinder.util

Examples of net.grinder.util.Directory


    String buildJVMArgument = createPropertyBuilder.buildJVMArgument();
    assertThat(buildJVMArgument, containsString("-Xmx"));
  }

  public PropertyBuilder createPropertyBuilder(String hostString) throws DirectoryException {
    Directory directory = new Directory(new File("."));
    GrinderProperties property = new GrinderProperties();

    return new PropertyBuilder(property, directory, true, hostString, NetworkUtils.getLocalHostName());
  }
View Full Code Here


          }

          if (startMessage != null) {

            final GrinderProperties messageProperties = startMessage.getProperties();
            final Directory fileStoreDirectory = m_fileStore.getDirectory();

            // Convert relative path to absolute path.
            messageProperties.setAssociatedFile(fileStoreDirectory.getFile(messageProperties
                .getAssociatedFile()));

            final File consoleScript = messageProperties.resolveRelativeFile(messageProperties.getFile(
                GrinderProperties.SCRIPT, GrinderProperties.DEFAULT_SCRIPT));
View Full Code Here

      deleteLogs(base);

      AbstractLanguageHandler handler = Lang.getByFileName(script).getHandler();
      AbstractGrinderClassPathProcessor classPathProcessor = handler.getClassPathProcessor();
      GrinderProperties properties = new GrinderProperties();
      PropertyBuilder builder = new PropertyBuilder(properties, new Directory(base), securityEnabled, hostString,
          NetworkUtils.getLocalHostName());
      properties.setInt("grinder.agents", 1);
      properties.setInt("grinder.processes", 1);
      properties.setInt("grinder.threads", 1);
      properties.setBoolean("grinder.script.validation", true);
      String grinderJVMClassPath = classPathProcessor.buildForemostClasspathBasedOnCurrentClassLoader(LOGGER)
          + File.pathSeparator + classPathProcessor.buildPatchClasspathBasedOnCurrentClassLoader(LOGGER)
          + File.pathSeparator + builder.buildCustomClassPath(true);
      properties.setProperty("grinder.jvm.classpath", grinderJVMClassPath);
      LOGGER.info("grinder.jvm.classpath  : {} ", grinderJVMClassPath);
      AgentIdentityImplementation agentIdentity = new AgentIdentityImplementation("validation");
      agentIdentity.setNumber(0);
      String newClassPath = classPathProcessor.buildClasspathBasedOnCurrentClassLoader(LOGGER);
      LOGGER.debug("validation class path " + newClassPath);
      Properties systemProperties = new Properties();
      systemProperties.put("java.class.path", base.getAbsolutePath() + File.pathSeparator + newClassPath);

      Directory workingDirectory = new Directory(base);
      String buildJVMArgumentWithoutMemory = builder.buildJVMArgumentWithoutMemory();
      LOGGER.info("jvm args : {} ", buildJVMArgumentWithoutMemory);
      final WorkerProcessCommandLine workerCommandLine = new WorkerProcessCommandLine(properties,
          systemProperties, buildJVMArgumentWithoutMemory, workingDirectory);
View Full Code Here

   * @return {@link ConsoleProperties}
   */
  public ConsoleProperties createConsoleProperties(PerfTest perfTest) {
    ConsoleProperties consoleProperties = ConsolePropertiesFactory.createEmptyConsoleProperties();
    try {
      consoleProperties.setAndSaveDistributionDirectory(new Directory(getDistributionPath(perfTest)));
      consoleProperties.setConsoleHost(config.getCurrentIP());
      consoleProperties.setIgnoreSampleCount(getSafe(perfTest.getIgnoreSampleCount()));
      consoleProperties.setSampleInterval(1000 * getSafe(perfTest.getSamplingInterval()));
    } catch (Exception e) {
      throw processException("Error while setting console properties", e);
View Full Code Here

TOP

Related Classes of net.grinder.util.Directory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.