Skip to content

Commit

Permalink
Merge branch 'main' into atomic_replacement_of_shutdown_node
Browse files Browse the repository at this point in the history
  • Loading branch information
achamayou authored Aug 8, 2023
2 parents 2995675 + c9d784f commit 87144a6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .azure-pipelines-templates/daily-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
pool: ado-virtual-ccf-sub
SGX:
container: sgx
pool: ado-sgx-ccf-sub
pool: ado-sgx-ccf-sub-backup
SNPCC:
container: snp
pool: ado-virtual-ccf-sub
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines-templates/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ parameters:
pool: ado-virtual-ccf-sub
SGX:
container: sgx
pool: ado-sgx-ccf-sub
pool: ado-sgx-ccf-sub-backup
SNPCC:
container: snp
pool: ado-virtual-ccf-sub
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines-templates/stress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
target: SGX
env:
container: sgx
pool: ado-sgx-ccf-sub
pool: ado-sgx-ccf-sub-backup
cmake_args: "-DCOMPILE_TARGET=sgx"
suffix: "StressTest"
artifact_name: "StressTest"
Expand Down
19 changes: 6 additions & 13 deletions tests/perf-system/submitter/submit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
#include <arrow/table.h>
#include <parquet/arrow/reader.h>
#include <parquet/arrow/writer.h>
#include <sys/sysinfo.h>
#include <time.h>
#include <signal.h>
#include <time.h>

using namespace std;
using namespace client;
Expand Down Expand Up @@ -314,15 +313,15 @@ int main(int argc, char** argv)
{
for (size_t ridx = read_reqs; ridx < requests_size; ridx++)
{
clock_gettime(CLOCK_MONOTONIC, &start[ridx]);
clock_gettime(CLOCK_REALTIME, &start[ridx]);
auto request = data_handler.request[ridx];
connection->write({request.data(), request.size()});
if (
connection->bytes_available() or
ridx - read_reqs >= args.max_inflight_requests)
{
responses[read_reqs] = connection->read_response();
clock_gettime(CLOCK_MONOTONIC, &end[read_reqs]);
clock_gettime(CLOCK_REALTIME, &end[read_reqs]);
read_reqs++;
}
if (ridx % 20000 == 0)
Expand All @@ -334,7 +333,7 @@ int main(int argc, char** argv)
while (read_reqs < requests_size)
{
responses[read_reqs] = connection->read_response();
clock_gettime(CLOCK_MONOTONIC, &end[read_reqs]);
clock_gettime(CLOCK_REALTIME, &end[read_reqs]);
read_reqs++;
}
connection.reset();
Expand All @@ -355,12 +354,6 @@ int main(int argc, char** argv)

LOG_INFO_FMT("Finished Request Submission");

// Calculate boot time
struct sysinfo info;
sysinfo(&info);
const auto boot_time = time(NULL) - info.uptime;
const auto boot_time_us = boot_time * 1'000'000;

for (size_t req = 0; req < requests_size; req++)
{
auto& response = responses[req];
Expand All @@ -378,9 +371,9 @@ int main(int argc, char** argv)
data_handler.response_body.push_back(std::move(response.body));

size_t send_time_us =
boot_time_us + start[req].tv_sec * 1'000'000 + start[req].tv_nsec / 1000;
start[req].tv_sec * 1'000'000 + start[req].tv_nsec / 1000;
size_t response_time_us =
boot_time_us + end[req].tv_sec * 1'000'000 + end[req].tv_nsec / 1000;
end[req].tv_sec * 1'000'000 + end[req].tv_nsec / 1000;
data_handler.send_time.push_back(send_time_us);
data_handler.response_time.push_back(response_time_us);
}
Expand Down

0 comments on commit 87144a6

Please sign in to comment.