Examples of Benchmark


Examples of jbe.BenchMark

    return "iaload";
  }

  public static void main(String[] args) {

    BenchMark bm = new Array();

    Execute.perform(bm);
  }
View Full Code Here

Examples of net.janino.util.Benchmark

        StringPattern[]      optionalWarningHandlePatterns,
        boolean              rebuild
    ) {
        this.optionalDestinationDirectory  = optionalDestinationDirectory;
        this.optionalCharacterEncoding     = optionalCharacterEncoding;
        this.benchmark                     = new Benchmark(verbose);
        this.debuggingInformation          = debuggingInformation;
        this.optionalWarningHandlePatterns = optionalWarningHandlePatterns;
        this.rebuild                       = rebuild;

        // Set up the IClassLoader.
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.Benchmark

 
  // create the benchmark and execute it.
  public Benchmark execBenchmark(String[] algLines) throws Exception {
    String algText = algLinesToText(algLines);
    logTstLogic(algText);
    Benchmark benchmark = new Benchmark(new StringReader(algText));
    benchmark.execute();
    return benchmark;
  }
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.Benchmark

    }
  }

  /** Benchmark should be able to load the algorithm when alt is specified */
  public void testWithAlt() throws Exception {
    Benchmark bm = execBenchmark(altAlg(true));
    assertNotNull(bm);
    assertNotNull(bm.getRunData().getPoints());
  }
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.Benchmark

 
  // create the benchmark and execute it.
  public Benchmark execBenchmark(String[] algLines) throws Exception {
    String algText = algLinesToText(algLines);
    logTstLogic(algText);
    Benchmark benchmark = new Benchmark(new StringReader(algText));
    benchmark.execute();
    return benchmark;
  }
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.Benchmark

   
    // 2. we test this value later
    CountingSearchTestTask.numSearches = 0;
   
    // 3. execute the algorithm  (required in every "logic" test)
    Benchmark benchmark = execBenchmark(algLines);

    // 4. test specific checks after the benchmark run completed.
    assertEquals("TestSearchTask was supposed to be called!",279,CountingSearchTestTask.numSearches);
    assertTrue("Index does not exist?...!", IndexReader.indexExists(benchmark.getRunData().getDirectory()));
    // now we should be able to open the index for write.
    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(),null,false);
    iw.close();
    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
    assertEquals("1000 docs were added to the index, this is what we expect to find!",1000,ir.numDocs());
  }
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.Benchmark

   
    // 2. we test this value later
    CountingSearchTestTask.numSearches = 0;
   
    // 3. execute the algorithm  (required in every "logic" test)
    Benchmark benchmark = execBenchmark(algLines);

    // 4. test specific checks after the benchmark run completed.
    assertEquals("TestSearchTask was supposed to be called!",139,CountingSearchTestTask.numSearches);
    assertTrue("Index does not exist?...!", IndexReader.indexExists(benchmark.getRunData().getDirectory()));
    // now we should be able to open the index for write.
    IndexWriter iw = new IndexWriter(benchmark.getRunData().getDirectory(),null,false);
    iw.close();
    IndexReader ir = IndexReader.open(benchmark.getRunData().getDirectory());
    assertEquals("1 docs were added to the index, this is what we expect to find!",1,ir.numDocs());
  }
View Full Code Here

Examples of org.apache.lucene.benchmark.byTask.Benchmark

 
  // create the benchmark and execute it.
  private Benchmark execBenchmark(String[] algLines) throws Exception {
    String algText = algLinesToText(algLines);
    logTstLogic(algText);
    Benchmark benchmark = new Benchmark(new StringReader(algText));
    benchmark.execute();
    return benchmark;
  }
View Full Code Here

Examples of org.apache.niolex.commons.test.Benchmark

  @Test
  public void testReadObject() throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    KryoOutstream ooo = new KryoOutstream(bos);
    Bean q = new Bean(5, "Another", 523212, new Date(1338008328334L));
    Benchmark bench = Benchmark.makeBenchmark();
    ooo.writeObject(bench);
    ooo.writeObject(q);
    ooo.close();
    byte[] bs = bos.toByteArray();
    System.out.println("L " + bs.length);
    // ----------
    KryoInstream iii = new KryoInstream(new ByteArrayInputStream(bs));
    Benchmark cp = iii.readObject(Benchmark.class);
    Bean t = iii.readObject(Bean.class);
    System.out.println("I " + t.getId());
    assertEquals(t.getBirth(), q.getBirth());
    assertEquals(bench, cp);
    iii.close();
View Full Code Here

Examples of org.apache.stanbol.enhancer.benchmark.Benchmark

    public void testStructureAndDescriptions() throws Exception {
        assertEquals("Number of benchmarks", 2, benchmarks.size());
       
        final Iterator<? extends Benchmark> bit = benchmarks.iterator();
        {
            final Benchmark b = bit.next();
            assertEquals("Bob Marley was born in Kingston, Jamaica.", b.getInputText());
            assertEquals("First benchmark group count", 2, b.size());
            final Iterator<TripleMatcherGroup> git = b.iterator();
            assertEquals("Kingston must be found", git.next().getDescription());
            assertEquals("Bob Marley must be found as a musical artist", git.next().getDescription());
            assertFalse(git.hasNext());
        }
       
        {
            final Benchmark b = bit.next();
            assertEquals("Paris Hilton might live in Paris, but she prefers New York.", b.getInputText());
            assertEquals("Second benchmark group count", 5, b.size());
            final Iterator<TripleMatcherGroup> git = b.iterator();
            for(int i=1; i <= 5; i++) {
                assertEquals("Second benchmark group " + i, git.next().getDescription());
            }
            assertFalse(git.hasNext());
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.