Skip to content

Commit

Permalink
Pushing to main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sharathvemula committed Apr 23, 2023
1 parent b3ac1f1 commit 39a19cc
Show file tree
Hide file tree
Showing 40 changed files with 15 additions and 2,784 deletions.
Binary file added waffleClient/.DS_Store
Binary file not shown.
Binary file added waffleClient/._.DS_Store
Binary file not shown.
14 changes: 5 additions & 9 deletions waffleClient/benchmark/src/proxy_benchmark.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
//
// Created by Lloyd Brown on 10/24/19.
//

// for windows mkdir
#ifdef _WIN32
#include <direct.h>
#endif
Expand Down Expand Up @@ -91,6 +86,7 @@ void run_benchmark(int run_time, bool stats, std::vector<int> &latencies, int cl
std::vector<std::string> results;
int i = 0;
while (elapsed < run_time*1000000) {
if(i == trace.size()) break;
//std::cout << "Entering proxy_benchmark.cpp line " << __LINE__ << "i = " << i << std::endl;
if (stats) {
rdtscll(start);
Expand All @@ -113,7 +109,7 @@ void run_benchmark(int run_time, bool stats, std::vector<int> &latencies, int cl
}
e = std::chrono::high_resolution_clock::now();
elapsed = static_cast<int>(std::chrono::duration_cast<std::chrono::microseconds>(e - s).count());
i = (i+1)%keys_values_pair.first.size();
++i;
}
if (stats)
ops = client.num_requests_satisfied() - ops;
Expand All @@ -138,14 +134,14 @@ void client(int idx, int client_batch_size, int object_size, trace_vector &trace
async_proxy_client client;
client.init(host, proxy_port);

// std::cout << "Client initialized" << std::endl;
// std::cout << "Client initialized with batch size " << client_batch_size << std::endl;
std::atomic<int> indiv_xput;
std::atomic_init(&indiv_xput, 0);
std::vector<int> latencies;
// std::cout << "Beginning warmup" << std::endl;
warmup(latencies, client_batch_size, object_size, trace, indiv_xput, client);
// std::cout << "Beginning benchmark" << std::endl;
run_benchmark(20, true, latencies, client_batch_size, object_size, trace, indiv_xput, client);
run_benchmark(30, true, latencies, client_batch_size, object_size, trace, indiv_xput, client);
std::string location = output_directory + "/" + std::to_string(idx);
std::ofstream out(location);
std::string line("");
Expand Down Expand Up @@ -188,7 +184,7 @@ int _mkdir(const char *path) {
}

int main(int argc, char *argv[]) {
std::string proxy_host = "192.168.152.109";
std::string proxy_host = "192.168.252.109";
int proxy_port = 9090;
std::string trace_location = "";
int client_batch_size = 50;
Expand Down
Binary file modified waffleClient/bin/proxy_benchmark
Binary file not shown.
Binary file modified waffleClient/bin/proxy_server
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Configuring done (0.3s)
-- Generating done (0.3s)
-- Build files have been written to: /home/svemula/Waffle/waffle_test/waffleClient/cmakebuild/cpp_redis-prefix/src/cpp_redis-build
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Configuring done (0.1s)
-- Generating done (0.2s)
-- Build files have been written to: /home/svemula/Waffle/waffle_test/waffleClient/cmakebuild/libcuckoo-prefix/src/libcuckoo-build
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 39a19cc

Please sign in to comment.