diff --git a/README.md b/README.md
index 540e663..848af42 100644
--- a/README.md
+++ b/README.md
@@ -12,13 +12,13 @@ jaggr is on Bintray and Maven Central (Soon):
com.caffinc
jaggr
- 0.4.0
+ 0.5.0
com.caffinc
jaggr-utils
- 0.4.0
+ 0.5.0
### Aggregating documents
@@ -162,6 +162,11 @@ However the `getFinalResult()` method must be called just once to get the final
5. Average
6. Collect as List
7. Collect as Set
+8. First Object
+9. Last Object
+10. Standard Deviation (Population)
+11. Top N Objects
+
## Tests
diff --git a/jaggr/jaggr-bench/pom.xml b/jaggr/jaggr-bench/pom.xml
index 14e210e..de880c2 100644
--- a/jaggr/jaggr-bench/pom.xml
+++ b/jaggr/jaggr-bench/pom.xml
@@ -5,7 +5,7 @@
jaggr-parent
com.caffinc
- 0.4.0
+ 0.5.0
4.0.0
diff --git a/jaggr/jaggr-bench/src/main/java/com/caffinc/jaggr/bench/Benchmark.java b/jaggr/jaggr-bench/src/main/java/com/caffinc/jaggr/bench/Benchmark.java
index 59ea100..46f8ca1 100644
--- a/jaggr/jaggr-bench/src/main/java/com/caffinc/jaggr/bench/Benchmark.java
+++ b/jaggr/jaggr-bench/src/main/java/com/caffinc/jaggr/bench/Benchmark.java
@@ -2,17 +2,19 @@
import com.caffinc.jaggr.core.Aggregation;
import com.caffinc.jaggr.core.AggregationBuilder;
-import com.caffinc.jaggr.core.operations.CollectSetOperation;
+import com.caffinc.jaggr.core.operations.AverageOperation;
+import com.caffinc.jaggr.core.operations.CountOperation;
+import com.caffinc.jaggr.core.operations.StdDevPopOperation;
+import com.caffinc.jaggr.core.operations.SumOperation;
+import com.caffinc.jaggr.utils.JsonFileIterator;
import com.caffinc.jaggr.utils.JsonIterator;
-import com.mongodb.BasicDBObject;
-import com.mongodb.DBCollection;
-import com.mongodb.DBObject;
-import com.mongodb.MongoClient;
+import com.google.gson.Gson;
+import com.mongodb.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.*;
-import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.CountDownLatch;
/**
* @author srira
@@ -30,29 +32,35 @@ public class Benchmark {
"STRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRINGSTRING";
public static void main(String[] args) throws Exception {
-// generateDocuments(BENCHMARK_COLLECTION, 1000000, getFieldDefinitions());
+// generateDocuments(BENCHMARK_COLLECTION, 10000000, getFieldDefinitions());
final Aggregation aggregation = new AggregationBuilder()
- .setGroupBy("name")
- .addOperation("groupedIds", new CollectSetOperation("_id"))
+// .setGroupBy("name")
+// .addOperation("groupedIds", new CollectSetOperation("_id"))
+ .addOperation("sum", new SumOperation("appeal"))
+ .addOperation("avg", new AverageOperation("age"))
+ .addOperation("count", new CountOperation())
+ .addOperation("stddev", new StdDevPopOperation("age"))
.getAggregation();
long startTime;
- LOG.info("Computing read time");
+ List