Browse Source

output OT timings and sizes

Sizes computed with a regression from strace output
Ian Goldberg 1 year ago
parent
commit
717737ff93
2 changed files with 9 additions and 3 deletions
  1. 7 1
      2p-preprocessing/ot_blinds.cpp
  2. 2 2
      Docker/run-experiment.sh

+ 7 - 1
2p-preprocessing/ot_blinds.cpp

@@ -425,7 +425,8 @@ int main(int argc, char **argv)
   auto end = std::chrono::steady_clock::now();
 	 
   std::chrono::duration<double> elapsed_seconds = end - start;
-	 std::cout << "time to generate and evaluate " << nblindbits << "OTs " << " is: " << elapsed_seconds.count() << "s\n";
+	 std::cout << "time to generate and evaluate " << nblindbits << " OTs is: " << elapsed_seconds.count() << "s\n";
+         std::cout << "bytes transmitted for OT = " << (54292 + 33 * nblindbits / 2) << " bytes\n";
 		
   delete sender;
 	}
@@ -437,6 +438,7 @@ int main(int argc, char **argv)
 
 			InitSender(addr1, port, glock);
 
+	 auto start = std::chrono::steady_clock::now();
 		OTExtSnd *sender = NULL;
 		receiver = InitOTExtRec(selected_options.prot, m_nBaseOTs, m_nChecks, selected_options.usemecr, selected_options.ftype, crypt);
 		sender = InitOTExtSnd(selected_options.prot, m_nBaseOTs, m_nChecks, selected_options.usemecr, selected_options.ftype, crypt);
@@ -445,6 +447,10 @@ int main(int argc, char **argv)
 		run_test_receiver(selected_options.numots, selected_options.bitlen, selected_options.sflavor, selected_options.rflavor, selected_options.nthreads, crypt, sender, receiver, m_nPID);
 
 		delete receiver;
+  auto end = std::chrono::steady_clock::now();
+  std::chrono::duration<double> elapsed_seconds = end - start;
+	 std::cout << "time to generate and evaluate " << nblindbits << " OTs is: " << elapsed_seconds.count() << "s\n";
+         std::cout << "bytes transmitted for OT = " << (54274 + 33 * nblindbits / 2) << " bytes\n";
 	}
 
 	Cleanup();

+ 2 - 2
Docker/run-experiment.sh

@@ -7,12 +7,12 @@ p2addr=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' duoram_p2)
 
 # The Duoram mode and size
 # mode is read, write, readwrite, or init
-duoramtype=2P
+duoramtype=3P
 phase=online
 mode=read
 size=20
 iters=128
-ramgb=128
+ramgb=16
 if [ "$1" != "" ]; then
     mode="$1"
 fi