|
@@ -159,6 +159,7 @@ int main(int argc, char **argv)
|
|
|
struct timeval otsetup_start;
|
|
|
gettimeofday(&otsetup_start, NULL);
|
|
|
|
|
|
+ cout << "num_threads = " << num_threads << "\n";
|
|
|
SPIR::init(num_threads);
|
|
|
|
|
|
string pub_params, pub_params_recv;
|
|
@@ -216,6 +217,10 @@ int main(int argc, char **argv)
|
|
|
size_t preproc_finish_us = elapsed_us(&preproc_finish_start);
|
|
|
cout << "Preprocessing client finish: " << preproc_finish_us << " µs\n";
|
|
|
|
|
|
+ size_t preproc_total_us = elapsed_us(&preproc_client_start);
|
|
|
+ cout << "\n\nTotal preprocessing time: " << preproc_total_us << " µs\n";
|
|
|
+ cout << "Total preprocessing bytes: " << (preproc_msg.length() + preproc_resp.length()) << "\n";
|
|
|
+
|
|
|
|
|
|
SPIR::DBEntry *db = new SPIR::DBEntry[num_records];
|
|
|
for (size_t i=0; i<num_records; ++i) {
|
|
@@ -232,7 +237,11 @@ int main(int argc, char **argv)
|
|
|
size_t tot_query_bytes = 0;
|
|
|
|
|
|
for (size_t i=0; i<num_pirs; ++i) {
|
|
|
- cout << "\n===== SPIR QUERY " << i+1 << " =====\n\n";
|
|
|
+ if (i < 2 || i == num_pirs-1) {
|
|
|
+ cout << "\n===== SPIR QUERY " << i+1 << " =====\n\n";
|
|
|
+ } else if (i == 2) {
|
|
|
+ cout << "\n...\n\n";
|
|
|
+ }
|
|
|
|
|
|
size_t idx;
|
|
|
if (getrandom(&idx, sizeof(idx), 0) != sizeof(idx)) {
|
|
@@ -268,8 +277,10 @@ int main(int argc, char **argv)
|
|
|
|
|
|
|
|
|
size_t query_client_us = elapsed_us(&query_client_start);
|
|
|
- cout << "Query client: " << query_client_us << " µs\n";
|
|
|
- cout << "query_msg len = " << query_msg.length() << "\n";
|
|
|
+ if (i < 2 || i == num_pirs-1) {
|
|
|
+ cout << "Query client: " << query_client_us << " µs\n";
|
|
|
+ cout << "query_msg len = " << query_msg.length() << "\n";
|
|
|
+ }
|
|
|
|
|
|
struct timeval query_server_start;
|
|
|
gettimeofday(&query_server_start, NULL);
|
|
@@ -282,8 +293,10 @@ int main(int argc, char **argv)
|
|
|
boost::asio::read(sockets_[0], boost::asio::buffer(query_resp_recv));
|
|
|
|
|
|
size_t query_server_us = elapsed_us(&query_server_start);
|
|
|
- cout << "Query server: " << query_server_us << " µs\n";
|
|
|
- cout << "query_resp len = " << query_resp.length() << "\n";
|
|
|
+ if (i < 2 || i == num_pirs-1) {
|
|
|
+ cout << "Query server: " << query_server_us << " µs\n";
|
|
|
+ cout << "query_resp len = " << query_resp.length() << "\n";
|
|
|
+ }
|
|
|
|
|
|
struct timeval query_finish_start;
|
|
|
gettimeofday(&query_finish_start, NULL);
|
|
@@ -308,8 +321,10 @@ int main(int argc, char **argv)
|
|
|
|
|
|
|
|
|
size_t query_finish_us = elapsed_us(&query_finish_start);
|
|
|
- cout << "Query client finish: " << query_finish_us << " µs\n";
|
|
|
- cout << "idx = " << idx << "; entry = " << entry << "\n";
|
|
|
+ if (i < 2 || i == num_pirs-1) {
|
|
|
+ cout << "Query client finish: " << query_finish_us << " µs\n";
|
|
|
+ cout << "idx = " << idx << "; entry = " << entry << "\n";
|
|
|
+ }
|
|
|
}
|
|
|
size_t all_queries_us = elapsed_us(&all_queries_start);
|
|
|
cout << "\n\nTotal query time: " << all_queries_us << " µs\n";
|