Codota Logo
BenchmarkConfiguration.getConcurrency
Code IndexAdd Codota to your IDE (free)

How to use
getConcurrency
method
in
org.opencb.opencga.storage.core.config.BenchmarkConfiguration

Best Java code snippets using org.opencb.opencga.storage.core.config.BenchmarkConfiguration.getConcurrency (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: opencb/opencga

  private <T> List<Future<T>> executeThreads(String test, Callable<T> task) throws ExecutionException, InterruptedException {
    int concurrency = storageConfiguration.getBenchmark().getConcurrency();
//        System.out.println("concurrency :: " + concurrency);
    ExecutorService executorService = Executors.newFixedThreadPool(10);
    List<Future<T>> futureList = new ArrayList<>(10);
    for (int i = 0; i < concurrency; i++) {
      futureList.add(executorService.submit(task));
    }

    int totalTime = 0;
    for (Future<T> queryResultFuture : futureList) {
      totalTime += ((QueryResult) queryResultFuture.get()).getDbTime();
//            System.out.println("queryResultFuture.get().getDbTime() = " + queryResultFuture.get().getDbTime());
//            System.out.println("queryResultFuture.get().getResult().size() = " + queryResultFuture.get().getResult().get(0));
    }

    benchmarkStats.addExecutionTime(test, totalTime);
    benchmarkStats.addStdDeviation(test, totalTime);

    return futureList;
  }
}
origin: opencb/opencga

public void addThreadGroup(List<? extends Sampler> samplers) {
  // Loop Controller
  LoopController loopController = new LoopController();
  loopController.setLoops(storageConfiguration.getBenchmark().getNumRepetitions());
  loopController.setFirst(true);
  loopController.setProperty(TestElement.TEST_CLASS, LoopController.class.getName());
  loopController.setProperty(TestElement.GUI_CLASS, LoopControlPanel.class.getName());
  loopController.initialize();
  // Thread Group
  ThreadGroup threadGroup = new ThreadGroup();
  threadGroup.setName("Thread-Group");
  threadGroup.setNumThreads(storageConfiguration.getBenchmark().getConcurrency());
  threadGroup.setRampUp(1);
  threadGroup.setSamplerController(loopController);
  threadGroup.setProperty(TestElement.TEST_CLASS, ThreadGroup.class.getName());
  threadGroup.setProperty(TestElement.GUI_CLASS, ThreadGroupGui.class.getName());
  // Construct Test Plan from previously initialized elements
  HashTree threadGroupHashTree = testPlanTree.add(testPlan, threadGroup);
  ConstantTimer timer = new ConstantTimer();
  timer.setDelay(String.valueOf(storageConfiguration.getBenchmark().getDelay()));
  timer.setName("timer");
  // Add samplers to the ThreadGroup
  threadGroupHashTree.add(samplers);
  // Add timer to the ThreadGroup
  threadGroupHashTree.add(timer);
}
origin: opencb/opencga

    storageConfiguration.getBenchmark().getConcurrency());
return benchmarkStats;
org.opencb.opencga.storage.core.configBenchmarkConfigurationgetConcurrency

Popular methods of BenchmarkConfiguration

  • getDatabaseName
  • getNumRepetitions
  • getRest
  • getTable
  • getDatabase
  • getDelay
  • getMode
  • getQueries
  • setConcurrency
  • setConnectionType
  • setDatabaseName
  • setDelay
  • setDatabaseName,
  • setDelay,
  • setMode,
  • setNumRepetitions,
  • setRest

Popular in Java

  • Reactive rest calls using spring rest template
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Socket (java.net)
    Provides a client-side TCP socket.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now