Search in sources :

Example 16 with BenchmarkOptions

use of com.carrotsearch.junitbenchmarks.BenchmarkOptions in project mongomvcc by igd-geo.

the class MongoDBVDatabaseBenchmark method plainOldInsertDeleteInsertQuery.

/**
 * Queries a lot of objects after inserting, deleting and inserting again
 */
@Test
@BenchmarkOptions(benchmarkRounds = 2, warmupRounds = 1)
public void plainOldInsertDeleteInsertQuery() {
    plainOldInsertDeleteInsert();
    _master.commit();
    DBCollection coll = _db.getCollection("persons");
    for (DBObject o : coll.find()) {
        assertTrue(((Long) o.get("age")).longValue() >= DOCUMENTS);
    }
}
Also used : DBCollection(com.mongodb.DBCollection) BasicDBObject(com.mongodb.BasicDBObject) DBObject(com.mongodb.DBObject) Test(org.junit.Test) BenchmarkOptions(com.carrotsearch.junitbenchmarks.BenchmarkOptions)

Example 17 with BenchmarkOptions

use of com.carrotsearch.junitbenchmarks.BenchmarkOptions in project mongomvcc by igd-geo.

the class MongoDBVDatabaseBenchmark method plainOldInsertDelete.

/**
 * Inserts a lot of documents using plain old MongoDB and then deletes them
 */
@Test
@BenchmarkOptions(benchmarkRounds = 2, warmupRounds = 1)
public void plainOldInsertDelete() {
    plainOldInsert();
    DBCollection coll = _db.getCollection("persons");
    for (long i = 0; i < DOCUMENTS; ++i) {
        coll.remove(new BasicDBObject("_id", 1 + i));
    }
}
Also used : DBCollection(com.mongodb.DBCollection) BasicDBObject(com.mongodb.BasicDBObject) Test(org.junit.Test) BenchmarkOptions(com.carrotsearch.junitbenchmarks.BenchmarkOptions)

Example 18 with BenchmarkOptions

use of com.carrotsearch.junitbenchmarks.BenchmarkOptions in project mongomvcc by igd-geo.

the class MongoDBVDatabaseBenchmark method mvccInsertDelete.

/**
 * Inserts a lot of documents using MongoMVCC and then deletes them
 */
@Test
@BenchmarkOptions(benchmarkRounds = 2, warmupRounds = 1)
public void mvccInsertDelete() {
    mvccInsert();
    VCollection coll = _master.getCollection("persons");
    for (long i = 0; i < DOCUMENTS; ++i) {
        coll.delete(1 + i);
    }
}
Also used : VCollection(de.fhg.igd.mongomvcc.VCollection) Test(org.junit.Test) BenchmarkOptions(com.carrotsearch.junitbenchmarks.BenchmarkOptions)

Example 19 with BenchmarkOptions

use of com.carrotsearch.junitbenchmarks.BenchmarkOptions in project druid by druid-io.

the class BitmapBenchmark method timeOffheapConciseUnion.

@Test
@BenchmarkOptions(warmupRounds = 1, benchmarkRounds = 2)
public void timeOffheapConciseUnion() throws Exception {
    ImmutableConciseSet union = ImmutableConciseSet.union(offheapConcise);
    Assert.assertEquals(unionCount, union.size());
}
Also used : ImmutableConciseSet(io.druid.extendedset.intset.ImmutableConciseSet) Test(org.junit.Test) BenchmarkOptions(com.carrotsearch.junitbenchmarks.BenchmarkOptions)

Example 20 with BenchmarkOptions

use of com.carrotsearch.junitbenchmarks.BenchmarkOptions in project druid by druid-io.

the class BitmapBenchmark method timeConciseUnion.

@Test
@BenchmarkOptions(warmupRounds = 1, benchmarkRounds = 2)
public void timeConciseUnion() throws Exception {
    ImmutableConciseSet union = ImmutableConciseSet.union(concise);
    Assert.assertEquals(unionCount, union.size());
}
Also used : ImmutableConciseSet(io.druid.extendedset.intset.ImmutableConciseSet) Test(org.junit.Test) BenchmarkOptions(com.carrotsearch.junitbenchmarks.BenchmarkOptions)

Aggregations

BenchmarkOptions (com.carrotsearch.junitbenchmarks.BenchmarkOptions)42 Test (org.junit.Test)42 DirectByteBufferAllocator (org.apache.parquet.bytes.DirectByteBufferAllocator)10 ListenableFuture (com.google.common.util.concurrent.ListenableFuture)6 ListeningExecutorService (com.google.common.util.concurrent.ListeningExecutorService)6 ThreadFactoryBuilder (com.google.common.util.concurrent.ThreadFactoryBuilder)6 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)6 ByteBufferInputStream (org.apache.parquet.bytes.ByteBufferInputStream)6 Binary (org.apache.parquet.io.api.Binary)6 Ignore (org.junit.Ignore)6 ArrayList (java.util.ArrayList)4 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)4 Pointer (org.directmemory.memory.Pointer)4 BasicDBObject (com.mongodb.BasicDBObject)3 MutableBitmap (io.druid.collections.bitmap.MutableBitmap)3 LinkedList (java.util.LinkedList)3 MutableBitmap (org.apache.druid.collections.bitmap.MutableBitmap)3 DeltaBinaryPackingValuesWriter (org.apache.parquet.column.values.delta.DeltaBinaryPackingValuesWriter)3 BinaryPlainValuesReader (org.apache.parquet.column.values.plain.BinaryPlainValuesReader)3 PlainValuesWriter (org.apache.parquet.column.values.plain.PlainValuesWriter)3