Commit 577af76a authored by Matthieu Dorier's avatar Matthieu Dorier

corrected Statistics class

parent f07057f1
...@@ -38,6 +38,7 @@ struct Statistics { ...@@ -38,6 +38,7 @@ struct Statistics {
var = wn*(var_n + avg_n*avg_n) var = wn*(var_n + avg_n*avg_n)
+ w1*value*value + w1*value*value
- avg*avg; - avg*avg;
num += 1;
} }
}; };
......
...@@ -20,7 +20,7 @@ void AsyncWriteBatchTest::testAsyncWriteBatchRun() { ...@@ -20,7 +20,7 @@ void AsyncWriteBatchTest::testAsyncWriteBatchRun() {
std::string key1 = "mykey"; std::string key1 = "mykey";
auto dataset = datastore->root().createDataSet("testAsyncWriteBatchRun"); auto dataset = datastore->root().createDataSet("testAsyncWriteBatchRun");
hepnos::AsyncEngine async_engine(*datastore, 2); hepnos::AsyncEngine async_engine(*datastore, 1);
{ {
hepnos::WriteBatch batch(async_engine); hepnos::WriteBatch batch(async_engine);
...@@ -30,6 +30,7 @@ void AsyncWriteBatchTest::testAsyncWriteBatchRun() { ...@@ -30,6 +30,7 @@ void AsyncWriteBatchTest::testAsyncWriteBatchRun() {
CPPUNIT_ASSERT(run.store(batch, key1, out_obj_a)); CPPUNIT_ASSERT(run.store(batch, key1, out_obj_a));
CPPUNIT_ASSERT(run.store(batch, key1, out_obj_b)); CPPUNIT_ASSERT(run.store(batch, key1, out_obj_b));
} }
batch.flush();
} }
async_engine.wait(); // useless, but just to test async_engine.wait(); // useless, but just to test
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment