]> AND Private Git Repository - loba.git/blobdiff - main.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Use online algorithms for statistics.
[loba.git] / main.cpp
index 3a47b920da0db461b81444de817c70e399e9e97d..67af3feb393943f76da81e6974988b1e872d9869 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -47,7 +47,7 @@ static int simulation_main(int argc, char* argv[])
         proc = opt::loba_algorithms.new_instance(opt::loba_algo, argc, argv);
         result = proc->run();
         comps.push(proc->get_comp());
         proc = opt::loba_algorithms.new_instance(opt::loba_algo, argc, argv);
         result = proc->run();
         comps.push(proc->get_comp());
-        loads.push(proc->get_load());
+        loads.push(proc->get_real_load());
         delete proc;
     }
     catch (std::invalid_argument& e) {
         delete proc;
     }
     catch (std::invalid_argument& e) {
@@ -65,7 +65,7 @@ static void check_for_lost_load()
     double lost_ratio = 100.0 * lost / total_init;
     if (lost_ratio < -opt::load_ratio_threshold)
         CRITICAL2("Gained load at exit! %g (%g%%) <============",
     double lost_ratio = 100.0 * lost / total_init;
     if (lost_ratio < -opt::load_ratio_threshold)
         CRITICAL2("Gained load at exit! %g (%g%%) <============",
-                  lost, lost_ratio);
+                  -lost, -lost_ratio);
     else if (lost_ratio > opt::load_ratio_threshold)
         CRITICAL2("Lost load at exit! %g (%g%%) <============",
                   lost, lost_ratio);
     else if (lost_ratio > opt::load_ratio_threshold)
         CRITICAL2("Lost load at exit! %g (%g%%) <============",
                   lost, lost_ratio);
@@ -88,7 +88,7 @@ static void check_for_lost_load()
 #define PR_STATS(descr, st)                                             \
     INFO5("| %.*s: %g / %g / %g", 39,                                   \
           descr " total/avg./stddev. at exit.........................", \
 #define PR_STATS(descr, st)                                             \
     INFO5("| %.*s: %g / %g / %g", 39,                                   \
           descr " total/avg./stddev. at exit.........................", \
-          st.get_sum(), st.get_avg(), st.get_stddev())
+          st.get_sum(), st.get_mean(), st.get_stddev())
 
 int main(int argc, char* argv[])
 {
 
 int main(int argc, char* argv[])
 {