This is an automated email from the ASF dual-hosted git repository.
junchao pushed a commit to branch smart_contract_merge
in repository https://gitbox.apache.org/repos/asf/incubator-resilientdb.git
The following commit(s) were added to refs/heads/smart_contract_merge by this
push:
new 9a57c3d6 merge master
9a57c3d6 is described below
commit 9a57c3d6f7461798da28cf21e253fbbecaec9537
Author: cjcchen <[email protected]>
AuthorDate: Fri Feb 14 02:48:45 2025 +0800
merge master
---
benchmark/protocols/fairdag/BUILD | 16 ----
.../protocols/fairdag/kv_server_performance.cpp | 88 --------------------
benchmark/protocols/fairdag_rl/BUILD | 16 ----
.../protocols/fairdag_rl/kv_server_performance.cpp | 88 --------------------
benchmark/protocols/hs/BUILD | 16 ----
benchmark/protocols/hs/kv_server_performance.cpp | 88 --------------------
benchmark/protocols/ooo_hs/BUILD | 16 ----
.../protocols/ooo_hs/kv_server_performance.cpp | 88 --------------------
benchmark/protocols/poe/kv_service_tools.cpp | 57 -------------
benchmark/protocols/rcc/BUILD | 31 -------
benchmark/protocols/rcc/CPUProfile | Bin 258560 -> 0 bytes
benchmark/protocols/rcc/example.png | Bin 20371 -> 0 bytes
benchmark/protocols/rcc/gmon.out | Bin 1192 -> 0 bytes
benchmark/protocols/rcc/info.prof | Bin 61565 -> 0 bytes
benchmark/protocols/rcc/kv_server_performance.cpp | 89 ---------------------
benchmark/protocols/rcc/kv_service_tools.cpp | 57 -------------
benchmark/protocols/rcc/test | Bin 18128 -> 0 bytes
benchmark/protocols/rcc/test.cpp | 79 ------------------
benchmark/protocols/tusk/BUILD | 16 ----
benchmark/protocols/tusk/kv_server_performance.cpp | 89 ---------------------
benchmark/protocols/tusk/kv_service_tools.cpp | 57 -------------
benchmark/protocols/zzy/BUILD | 16 ----
benchmark/protocols/zzy/kv_server_performance.cpp | 88 --------------------
23 files changed, 995 deletions(-)
diff --git a/benchmark/protocols/fairdag/BUILD
b/benchmark/protocols/fairdag/BUILD
deleted file mode 100644
index 81e6443f..00000000
--- a/benchmark/protocols/fairdag/BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-package(default_visibility = ["//visibility:private"])
-
-load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-
-cc_binary(
- name = "kv_server_performance",
- srcs = ["kv_server_performance.cpp"],
- deps = [
- "//chain/storage:memory_db",
- "//executor/kv:kv_executor",
- "//platform/config:resdb_config_utils",
- "//platform/consensus/ordering/fairdag/framework:consensus",
- "//service/utils:server_factory",
- ],
-)
-
diff --git a/benchmark/protocols/fairdag/kv_server_performance.cpp
b/benchmark/protocols/fairdag/kv_server_performance.cpp
deleted file mode 100644
index a3ee35a6..00000000
--- a/benchmark/protocols/fairdag/kv_server_performance.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <glog/logging.h>
-
-#include "chain/storage/memory_db.h"
-#include "executor/kv/kv_executor.h"
-#include "platform/config/resdb_config_utils.h"
-#include "platform/consensus/ordering/fairdag/framework/consensus.h"
-#include "platform/networkstrate/service_network.h"
-#include "platform/statistic/stats.h"
-#include "proto/kv/kv.pb.h"
-
-using namespace resdb;
-using namespace resdb::fairdag;
-using namespace resdb::storage;
-
-void ShowUsage() {
- printf("<config> <private_key> <cert_file> [logging_dir]\n");
-}
-
-std::string GetRandomKey() {
- int num1 = rand() % 10;
- int num2 = rand() % 10;
- return std::to_string(num1) + std::to_string(num2);
-}
-
-int main(int argc, char** argv) {
- if (argc < 3) {
- ShowUsage();
- exit(0);
- }
-
- // google::InitGoogleLogging(argv[0]);
- // FLAGS_minloglevel = google::GLOG_WARNING;
-
- char* config_file = argv[1];
- char* private_key_file = argv[2];
- char* cert_file = argv[3];
-
- if (argc >= 5) {
- auto monitor_port = Stats::GetGlobalStats(5);
- monitor_port->SetPrometheus(argv[4]);
- }
-
- std::unique_ptr<ResDBConfig> config =
- GenerateResDBConfig(config_file, private_key_file, cert_file);
-
- config->RunningPerformance(true);
-
- auto performance_consens = std::make_unique<FairDAGConsensus>(
- *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
- performance_consens->SetupPerformanceDataFunc([]() {
- KVRequest request;
- request.set_cmd(KVRequest::SET);
- request.set_key(GetRandomKey());
- request.set_value("helloworld");
- std::string request_data;
- request.SerializeToString(&request_data);
- return request_data;
- });
-
- auto server =
- std::make_unique<ServiceNetwork>(*config,
std::move(performance_consens));
- server->Run();
-}
diff --git a/benchmark/protocols/fairdag_rl/BUILD
b/benchmark/protocols/fairdag_rl/BUILD
deleted file mode 100644
index 1c49da21..00000000
--- a/benchmark/protocols/fairdag_rl/BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-package(default_visibility = ["//visibility:private"])
-
-load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-
-cc_binary(
- name = "kv_server_performance",
- srcs = ["kv_server_performance.cpp"],
- deps = [
- "//chain/storage:memory_db",
- "//executor/kv:kv_executor",
- "//platform/config:resdb_config_utils",
- "//platform/consensus/ordering/fairdag_rl/framework:consensus",
- "//service/utils:server_factory",
- ],
-)
-
diff --git a/benchmark/protocols/fairdag_rl/kv_server_performance.cpp
b/benchmark/protocols/fairdag_rl/kv_server_performance.cpp
deleted file mode 100644
index bb7b30f0..00000000
--- a/benchmark/protocols/fairdag_rl/kv_server_performance.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <glog/logging.h>
-
-#include "chain/storage/memory_db.h"
-#include "executor/kv/kv_executor.h"
-#include "platform/config/resdb_config_utils.h"
-#include "platform/consensus/ordering/fairdag_rl/framework/consensus.h"
-#include "platform/networkstrate/service_network.h"
-#include "platform/statistic/stats.h"
-#include "proto/kv/kv.pb.h"
-
-using namespace resdb;
-using namespace resdb::fairdag_rl;
-using namespace resdb::storage;
-
-void ShowUsage() {
- printf("<config> <private_key> <cert_file> [logging_dir]\n");
-}
-
-std::string GetRandomKey() {
- int num1 = rand() % 10;
- int num2 = rand() % 10;
- return std::to_string(num1) + std::to_string(num2);
-}
-
-int main(int argc, char** argv) {
- if (argc < 3) {
- ShowUsage();
- exit(0);
- }
-
- // google::InitGoogleLogging(argv[0]);
- // FLAGS_minloglevel = google::GLOG_WARNING;
-
- char* config_file = argv[1];
- char* private_key_file = argv[2];
- char* cert_file = argv[3];
-
- if (argc >= 5) {
- auto monitor_port = Stats::GetGlobalStats(5);
- monitor_port->SetPrometheus(argv[4]);
- }
-
- std::unique_ptr<ResDBConfig> config =
- GenerateResDBConfig(config_file, private_key_file, cert_file);
-
- config->RunningPerformance(true);
-
- auto performance_consens = std::make_unique<FairDAGConsensus>(
- *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
- performance_consens->SetupPerformanceDataFunc([]() {
- KVRequest request;
- request.set_cmd(KVRequest::SET);
- request.set_key(GetRandomKey());
- request.set_value("helloworld");
- std::string request_data;
- request.SerializeToString(&request_data);
- return request_data;
- });
-
- auto server =
- std::make_unique<ServiceNetwork>(*config,
std::move(performance_consens));
- server->Run();
-}
diff --git a/benchmark/protocols/hs/BUILD b/benchmark/protocols/hs/BUILD
deleted file mode 100644
index f1c2cb86..00000000
--- a/benchmark/protocols/hs/BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-package(default_visibility = ["//visibility:private"])
-
-load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-
-cc_binary(
- name = "kv_server_performance",
- srcs = ["kv_server_performance.cpp"],
- deps = [
- "//chain/storage:memory_db",
- "//executor/kv:kv_executor",
- "//platform/config:resdb_config_utils",
- "//platform/consensus/ordering/hs/framework:consensus",
- "//service/utils:server_factory",
- ],
-)
-
diff --git a/benchmark/protocols/hs/kv_server_performance.cpp
b/benchmark/protocols/hs/kv_server_performance.cpp
deleted file mode 100644
index bffa725f..00000000
--- a/benchmark/protocols/hs/kv_server_performance.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <glog/logging.h>
-
-#include "chain/storage/memory_db.h"
-#include "executor/kv/kv_executor.h"
-#include "platform/config/resdb_config_utils.h"
-#include "platform/consensus/ordering/hs/framework/consensus.h"
-#include "platform/networkstrate/service_network.h"
-#include "platform/statistic/stats.h"
-#include "proto/kv/kv.pb.h"
-
-using namespace resdb;
-using namespace resdb::hs;
-using namespace resdb::storage;
-
-void ShowUsage() {
- printf("<config> <private_key> <cert_file> [logging_dir]\n");
-}
-
-std::string GetRandomKey() {
- int num1 = rand() % 10;
- int num2 = rand() % 10;
- return std::to_string(num1) + std::to_string(num2);
-}
-
-int main(int argc, char** argv) {
- if (argc < 3) {
- ShowUsage();
- exit(0);
- }
-
- // google::InitGoogleLogging(argv[0]);
- // FLAGS_minloglevel = google::GLOG_WARNING;
-
- char* config_file = argv[1];
- char* private_key_file = argv[2];
- char* cert_file = argv[3];
-
- if (argc >= 5) {
- auto monitor_port = Stats::GetGlobalStats(5);
- monitor_port->SetPrometheus(argv[4]);
- }
-
- std::unique_ptr<ResDBConfig> config =
- GenerateResDBConfig(config_file, private_key_file, cert_file);
-
- config->RunningPerformance(true);
-
- auto performance_consens = std::make_unique<hs::Consensus>(
- *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
- performance_consens->SetupPerformanceDataFunc([]() {
- KVRequest request;
- request.set_cmd(KVRequest::SET);
- request.set_key(GetRandomKey());
- request.set_value("helloworld");
- std::string request_data;
- request.SerializeToString(&request_data);
- return request_data;
- });
-
- auto server =
- std::make_unique<ServiceNetwork>(*config,
std::move(performance_consens));
- server->Run();
-}
diff --git a/benchmark/protocols/ooo_hs/BUILD b/benchmark/protocols/ooo_hs/BUILD
deleted file mode 100644
index a29311c9..00000000
--- a/benchmark/protocols/ooo_hs/BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-package(default_visibility = ["//visibility:private"])
-
-load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-
-cc_binary(
- name = "kv_server_performance",
- srcs = ["kv_server_performance.cpp"],
- deps = [
- "//chain/storage:memory_db",
- "//executor/kv:kv_executor",
- "//platform/config:resdb_config_utils",
- "//platform/consensus/ordering/ooo_hs/framework:consensus",
- "//service/utils:server_factory",
- ],
-)
-
diff --git a/benchmark/protocols/ooo_hs/kv_server_performance.cpp
b/benchmark/protocols/ooo_hs/kv_server_performance.cpp
deleted file mode 100644
index c0ea8846..00000000
--- a/benchmark/protocols/ooo_hs/kv_server_performance.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <glog/logging.h>
-
-#include "chain/storage/memory_db.h"
-#include "executor/kv/kv_executor.h"
-#include "platform/config/resdb_config_utils.h"
-#include "platform/consensus/ordering/ooo_hs/framework/consensus.h"
-#include "platform/networkstrate/service_network.h"
-#include "platform/statistic/stats.h"
-#include "proto/kv/kv.pb.h"
-
-using namespace resdb;
-using namespace resdb::ooohs;
-using namespace resdb::storage;
-
-void ShowUsage() {
- printf("<config> <private_key> <cert_file> [logging_dir]\n");
-}
-
-std::string GetRandomKey() {
- int num1 = rand() % 10;
- int num2 = rand() % 10;
- return std::to_string(num1) + std::to_string(num2);
-}
-
-int main(int argc, char** argv) {
- if (argc < 3) {
- ShowUsage();
- exit(0);
- }
-
- // google::InitGoogleLogging(argv[0]);
- // FLAGS_minloglevel = google::GLOG_WARNING;
-
- char* config_file = argv[1];
- char* private_key_file = argv[2];
- char* cert_file = argv[3];
-
- if (argc >= 5) {
- auto monitor_port = Stats::GetGlobalStats(5);
- monitor_port->SetPrometheus(argv[4]);
- }
-
- std::unique_ptr<ResDBConfig> config =
- GenerateResDBConfig(config_file, private_key_file, cert_file);
-
- config->RunningPerformance(true);
-
- auto performance_consens = std::make_unique<ooohs::Consensus>(
- *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
- performance_consens->SetupPerformanceDataFunc([]() {
- KVRequest request;
- request.set_cmd(KVRequest::SET);
- request.set_key(GetRandomKey());
- request.set_value("helloworld");
- std::string request_data;
- request.SerializeToString(&request_data);
- return request_data;
- });
-
- auto server =
- std::make_unique<ServiceNetwork>(*config,
std::move(performance_consens));
- server->Run();
-}
diff --git a/benchmark/protocols/poe/kv_service_tools.cpp
b/benchmark/protocols/poe/kv_service_tools.cpp
deleted file mode 100644
index 17858ef2..00000000
--- a/benchmark/protocols/poe/kv_service_tools.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <fstream>
-
-#include "common/proto/signature_info.pb.h"
-#include "interface/kv/kv_client.h"
-#include "platform/config/resdb_config_utils.h"
-
-using resdb::GenerateReplicaInfo;
-using resdb::GenerateResDBConfig;
-using resdb::KVClient;
-using resdb::ReplicaInfo;
-using resdb::ResDBConfig;
-
-int main(int argc, char** argv) {
- if (argc < 2) {
- printf("<config path>\n");
- return 0;
- }
- std::string client_config_file = argv[1];
- ResDBConfig config = GenerateResDBConfig(client_config_file);
-
- config.SetClientTimeoutMs(100000);
-
- KVClient client(config);
-
- client.Set("start", "value");
- printf("start benchmark\n");
-}
diff --git a/benchmark/protocols/rcc/BUILD b/benchmark/protocols/rcc/BUILD
deleted file mode 100644
index e760015e..00000000
--- a/benchmark/protocols/rcc/BUILD
+++ /dev/null
@@ -1,31 +0,0 @@
-package(default_visibility = ["//visibility:private"])
-
-load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-
-cc_binary(
- name = "kv_server_performance",
- srcs = ["kv_server_performance.cpp"],
- deps = [
- "//chain/storage:memory_db",
- "//executor/kv:kv_executor",
- "//platform/config:resdb_config_utils",
- "//platform/consensus/ordering/rcc/framework:consensus",
- "//service/utils:server_factory",
- ],
-)
-
-cc_binary(
- name = "test",
- srcs = ["test.cpp"],
- deps = [
- ],
- linkopts = [
- "-l:libprofiler.a",
- "-pthread",
- "-L/usr/local/lib"
- ],
- copts = [
- "-pg",
- ]
-)
-
diff --git a/benchmark/protocols/rcc/CPUProfile
b/benchmark/protocols/rcc/CPUProfile
deleted file mode 100644
index b0273a0d..00000000
Binary files a/benchmark/protocols/rcc/CPUProfile and /dev/null differ
diff --git a/benchmark/protocols/rcc/example.png
b/benchmark/protocols/rcc/example.png
deleted file mode 100644
index a86cb1bd..00000000
Binary files a/benchmark/protocols/rcc/example.png and /dev/null differ
diff --git a/benchmark/protocols/rcc/gmon.out b/benchmark/protocols/rcc/gmon.out
deleted file mode 100644
index 70563269..00000000
Binary files a/benchmark/protocols/rcc/gmon.out and /dev/null differ
diff --git a/benchmark/protocols/rcc/info.prof
b/benchmark/protocols/rcc/info.prof
deleted file mode 100644
index 102fc294..00000000
Binary files a/benchmark/protocols/rcc/info.prof and /dev/null differ
diff --git a/benchmark/protocols/rcc/kv_server_performance.cpp
b/benchmark/protocols/rcc/kv_server_performance.cpp
deleted file mode 100644
index 824e1afa..00000000
--- a/benchmark/protocols/rcc/kv_server_performance.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <glog/logging.h>
-
-#include "chain/storage/memory_db.h"
-#include "executor/kv/kv_executor.h"
-#include "platform/config/resdb_config_utils.h"
-#include "platform/consensus/ordering/rcc/framework/consensus.h"
-#include "platform/networkstrate/service_network.h"
-#include "platform/statistic/stats.h"
-#include "proto/kv/kv.pb.h"
-
-using namespace resdb;
-using namespace resdb::rcc;
-using namespace resdb::storage;
-
-void ShowUsage() {
- printf("<config> <private_key> <cert_file> [logging_dir]\n");
-}
-
-std::string GetRandomKey() {
- int num1 = rand() % 10;
- int num2 = rand() % 10;
- return std::to_string(num1) + std::to_string(num2);
-}
-
-int main(int argc, char** argv) {
- if (argc < 3) {
- ShowUsage();
- exit(0);
- }
-
- // google::InitGoogleLogging(argv[0]);
- // FLAGS_minloglevel = google::GLOG_WARNING;
-
- char* config_file = argv[1];
- char* private_key_file = argv[2];
- char* cert_file = argv[3];
-
- if (argc >= 5) {
- auto monitor_port = Stats::GetGlobalStats(5);
- monitor_port->SetPrometheus(argv[4]);
- }
-
- std::unique_ptr<ResDBConfig> config =
- GenerateResDBConfig(config_file, private_key_file, cert_file);
-
- config->RunningPerformance(true);
- ResConfigData config_data = config->GetConfigData();
-
- auto performance_consens = std::make_unique<Consensus>(
- *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
- performance_consens->SetupPerformanceDataFunc([]() {
- KVRequest request;
- request.set_cmd(KVRequest::SET);
- request.set_key(GetRandomKey());
- request.set_value("helloword");
- std::string request_data;
- request.SerializeToString(&request_data);
- return request_data;
- });
-
- auto server =
- std::make_unique<ServiceNetwork>(*config,
std::move(performance_consens));
- server->Run();
-}
diff --git a/benchmark/protocols/rcc/kv_service_tools.cpp
b/benchmark/protocols/rcc/kv_service_tools.cpp
deleted file mode 100644
index 17858ef2..00000000
--- a/benchmark/protocols/rcc/kv_service_tools.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <fstream>
-
-#include "common/proto/signature_info.pb.h"
-#include "interface/kv/kv_client.h"
-#include "platform/config/resdb_config_utils.h"
-
-using resdb::GenerateReplicaInfo;
-using resdb::GenerateResDBConfig;
-using resdb::KVClient;
-using resdb::ReplicaInfo;
-using resdb::ResDBConfig;
-
-int main(int argc, char** argv) {
- if (argc < 2) {
- printf("<config path>\n");
- return 0;
- }
- std::string client_config_file = argv[1];
- ResDBConfig config = GenerateResDBConfig(client_config_file);
-
- config.SetClientTimeoutMs(100000);
-
- KVClient client(config);
-
- client.Set("start", "value");
- printf("start benchmark\n");
-}
diff --git a/benchmark/protocols/rcc/test b/benchmark/protocols/rcc/test
deleted file mode 100755
index b5a766bc..00000000
Binary files a/benchmark/protocols/rcc/test and /dev/null differ
diff --git a/benchmark/protocols/rcc/test.cpp b/benchmark/protocols/rcc/test.cpp
deleted file mode 100644
index 86af9c16..00000000
--- a/benchmark/protocols/rcc/test.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-
- #include <iostream>
-#include <csignal>
-#include <stdio.h>
-#include <time.h>
-#include <stdlib.h>
-#include <gperftools/profiler.h>
-#include <unistd.h>
-
-void consumeSomeCPUTime1(int input){
- int i = 0;
- input++;
- while(i++ < 100000){
- i--; i++; i--; i++;
- }
-};
-
-void consumeSomeCPUTime2(int input){
- input++;
- consumeSomeCPUTime1(input);
- int i = 0;
- while(i++ < 100000){
- i--; i++; i--; i++;
- }
-};
-
-int stupidComputing(int a, int b){
- int i = 0;
- while( i++ < 1000){
- consumeSomeCPUTime1(i);
- }
- int j = 0;
- while(j++ < 5000){
- consumeSomeCPUTime2(j);
- }
- return a+b;
-};
-
-int smartComputing(int a, int b){
- return a+b;
-};
-
-void signalHandler ( int signum ) {
- std::cout<<"out:"<<std::endl;
- //LOG(ERROR)<<" exit ====== ";
-}
-
-int main()
-{
-/*
- if (SIG_ERR == signal(SIGABRT, signalHandler)) {
- return 1;
- }
- if (SIG_ERR == signal(SIGILL, signalHandler)) {
- return 1;
- }
- if (SIG_ERR == signal(SIGTERM, signalHandler)) {
- return 1;
- }
-
- if (SIG_ERR == signal(SIGFPE, signalHandler)) {
- return 1;
- }
- */
-
- int i = 0;
- printf("reached the start point of performance bottle neck\n");
- sleep(5);
- // ProfilerStart("info.prof");
- while( i++ < 2){
- printf("Stupid computing return : %d\n",stupidComputing(i, i+1));
- printf("Smart computing return %d\n",smartComputing(i+1, i+2));
- }
- printf("should teminate profiling now.\n");
- sleep(5);
- //ProfilerStop();
-
- return 0;
-}
diff --git a/benchmark/protocols/tusk/BUILD b/benchmark/protocols/tusk/BUILD
deleted file mode 100644
index bc466d04..00000000
--- a/benchmark/protocols/tusk/BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-package(default_visibility = ["//visibility:private"])
-
-load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-
-cc_binary(
- name = "kv_server_performance",
- srcs = ["kv_server_performance.cpp"],
- deps = [
- "//chain/storage:memory_db",
- "//executor/kv:kv_executor",
- "//platform/config:resdb_config_utils",
- "//platform/consensus/ordering/tusk/framework:consensus",
- "//service/utils:server_factory",
- ],
-)
-
diff --git a/benchmark/protocols/tusk/kv_server_performance.cpp
b/benchmark/protocols/tusk/kv_server_performance.cpp
deleted file mode 100644
index 4f2789e1..00000000
--- a/benchmark/protocols/tusk/kv_server_performance.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <glog/logging.h>
-
-#include "chain/storage/memory_db.h"
-#include "executor/kv/kv_executor.h"
-#include "platform/config/resdb_config_utils.h"
-#include "platform/consensus/ordering/tusk/framework/consensus.h"
-#include "platform/networkstrate/service_network.h"
-#include "platform/statistic/stats.h"
-#include "proto/kv/kv.pb.h"
-
-using namespace resdb;
-using namespace resdb::tusk;
-using namespace resdb::storage;
-
-void ShowUsage() {
- printf("<config> <private_key> <cert_file> [logging_dir]\n");
-}
-
-std::string GetRandomKey() {
- int num1 = rand() % 10;
- int num2 = rand() % 10;
- return std::to_string(num1) + std::to_string(num2);
-}
-
-int main(int argc, char** argv) {
- if (argc < 3) {
- ShowUsage();
- exit(0);
- }
-
- // google::InitGoogleLogging(argv[0]);
- // FLAGS_minloglevel = google::GLOG_WARNING;
-
- char* config_file = argv[1];
- char* private_key_file = argv[2];
- char* cert_file = argv[3];
-
- if (argc >= 5) {
- auto monitor_port = Stats::GetGlobalStats(5);
- monitor_port->SetPrometheus(argv[4]);
- }
-
- std::unique_ptr<ResDBConfig> config =
- GenerateResDBConfig(config_file, private_key_file, cert_file);
-
- config->RunningPerformance(true);
- ResConfigData config_data = config->GetConfigData();
-
- auto performance_consens = std::make_unique<TuskConsensus>(
- *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
- performance_consens->SetupPerformanceDataFunc([]() {
- KVRequest request;
- request.set_cmd(KVRequest::SET);
- request.set_key(GetRandomKey());
- request.set_value("helloworld");
- std::string request_data;
- request.SerializeToString(&request_data);
- return request_data;
- });
-
- auto server =
- std::make_unique<ServiceNetwork>(*config,
std::move(performance_consens));
- server->Run();
-}
diff --git a/benchmark/protocols/tusk/kv_service_tools.cpp
b/benchmark/protocols/tusk/kv_service_tools.cpp
deleted file mode 100644
index 17858ef2..00000000
--- a/benchmark/protocols/tusk/kv_service_tools.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <fstream>
-
-#include "common/proto/signature_info.pb.h"
-#include "interface/kv/kv_client.h"
-#include "platform/config/resdb_config_utils.h"
-
-using resdb::GenerateReplicaInfo;
-using resdb::GenerateResDBConfig;
-using resdb::KVClient;
-using resdb::ReplicaInfo;
-using resdb::ResDBConfig;
-
-int main(int argc, char** argv) {
- if (argc < 2) {
- printf("<config path>\n");
- return 0;
- }
- std::string client_config_file = argv[1];
- ResDBConfig config = GenerateResDBConfig(client_config_file);
-
- config.SetClientTimeoutMs(100000);
-
- KVClient client(config);
-
- client.Set("start", "value");
- printf("start benchmark\n");
-}
diff --git a/benchmark/protocols/zzy/BUILD b/benchmark/protocols/zzy/BUILD
deleted file mode 100644
index 9a349028..00000000
--- a/benchmark/protocols/zzy/BUILD
+++ /dev/null
@@ -1,16 +0,0 @@
-package(default_visibility = ["//visibility:private"])
-
-load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
-
-cc_binary(
- name = "kv_server_performance",
- srcs = ["kv_server_performance.cpp"],
- deps = [
- "//chain/storage:memory_db",
- "//executor/kv:kv_executor",
- "//platform/config:resdb_config_utils",
- "//platform/consensus/ordering/zzy/framework:consensus",
- "//service/utils:server_factory",
- ],
-)
-
diff --git a/benchmark/protocols/zzy/kv_server_performance.cpp
b/benchmark/protocols/zzy/kv_server_performance.cpp
deleted file mode 100644
index 1c0700e1..00000000
--- a/benchmark/protocols/zzy/kv_server_performance.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2019-2022 ExpoLab, UC Davis
- *
- * Permission is hereby granted, free of charge, to any person
- * obtaining a copy of this software and associated documentation
- * files (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be
- * included in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
- * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
- * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- *
- */
-
-#include <glog/logging.h>
-
-#include "chain/storage/memory_db.h"
-#include "executor/kv/kv_executor.h"
-#include "platform/config/resdb_config_utils.h"
-#include "platform/consensus/ordering/zzy/framework/consensus.h"
-#include "platform/networkstrate/service_network.h"
-#include "platform/statistic/stats.h"
-#include "proto/kv/kv.pb.h"
-
-using namespace resdb;
-using namespace resdb::zzy;
-using namespace resdb::storage;
-
-void ShowUsage() {
- printf("<config> <private_key> <cert_file> [logging_dir]\n");
-}
-
-std::string GetRandomKey() {
- int num1 = rand() % 10;
- int num2 = rand() % 10;
- return std::to_string(num1) + std::to_string(num2);
-}
-
-int main(int argc, char** argv) {
- if (argc < 3) {
- ShowUsage();
- exit(0);
- }
-
- // google::InitGoogleLogging(argv[0]);
- // FLAGS_minloglevel = google::GLOG_WARNING;
-
- char* config_file = argv[1];
- char* private_key_file = argv[2];
- char* cert_file = argv[3];
-
- if (argc >= 5) {
- auto monitor_port = Stats::GetGlobalStats(5);
- monitor_port->SetPrometheus(argv[4]);
- }
-
- std::unique_ptr<ResDBConfig> config =
- GenerateResDBConfig(config_file, private_key_file, cert_file);
-
- config->RunningPerformance(true);
- ResConfigData config_data = config->GetConfigData();
-
- auto performance_consens = std::make_unique<Consensus>(
- *config, std::make_unique<KVExecutor>(std::make_unique<MemoryDB>()));
- performance_consens->SetupPerformanceDataFunc([]() {
- KVRequest request;
- request.set_cmd(KVRequest::SET);
- request.set_key(GetRandomKey());
- request.set_value("helloword");
- std::string request_data;
- request.SerializeToString(&request_data);
- return request_data;
- });
- auto server =
- std::make_unique<ServiceNetwork>(*config,
std::move(performance_consens));
- server->Run();
-}