Browse Source

Have MPCPeerIO's dump_stats also show the stats of number of precomputed values used

Ian Goldberg 2 years ago
parent
commit
e48ee72b6f
2 changed files with 7 additions and 7 deletions
  1. 7 0
      mpcio.hpp
  2. 0 7
      online.cpp

+ 7 - 0
mpcio.hpp

@@ -422,6 +422,13 @@ struct MPCPeerIO : public MPCIO {
             halftriples[i].reset_stats();
         }
     }
+
+    void dump_stats(std::ostream &os)
+    {
+        MPCIO::dump_stats(os);
+        os << "Precomputed values used: ";
+        dump_precomp_stats(os);
+    }
 };
 
 // A class to represent all of the server party's IO, either to

+ 0 - 7
online.cpp

@@ -68,13 +68,6 @@ static void online_test(MPCIO &mpcio, int num_threads, char **args)
         delete[] S;
     }
 
-    if (!is_server) {
-        MPCPeerIO &mpcpio = static_cast<MPCPeerIO &>(mpcio);
-        mpcpio.dump_precomp_stats(std::cout);
-    }
-
-    std::cout << "Lamport clock = " << mpcio.lamport << "\n";
-
     delete[] A;
 }