From 30e0e22a08cab4b4777452b779d29696fafb43da Mon Sep 17 00:00:00 2001 From: Airat Arifullin Date: Thu, 20 Jul 2023 14:47:21 +0300 Subject: [PATCH] [#30] report: log start and end time of load scenario Signed-off-by: Airat Arifullin a.arifullin@yadro.com --- scenarios/grpc.js | 5 +++++ scenarios/grpc_car.js | 5 +++++ scenarios/http.js | 5 +++++ scenarios/local.js | 5 +++++ scenarios/s3.js | 5 +++++ scenarios/s3_car.js | 5 +++++ scenarios/s3local.js | 5 +++++ 7 files changed, 35 insertions(+) diff --git a/scenarios/grpc.js b/scenarios/grpc.js index 5719d5f..e668b6b 100644 --- a/scenarios/grpc.js +++ b/scenarios/grpc.js @@ -103,12 +103,17 @@ export function setup() { console.log(`Writing VUs: ${write_vu_count}`); console.log(`Deleting VUs: ${delete_vu_count}`); console.log(`Total VUs: ${total_vu_count}`); + + const start_timestamp = Date.now() + console.log(`Load started at: ${Date(start_timestamp).toString()}`) } export function teardown(data) { if (obj_registry) { obj_registry.close(); } + const end_timestamp = Date.now() + console.log(`Load finished at: ${Date(end_timestamp).toString()}`) } export function handleSummary(data) { diff --git a/scenarios/grpc_car.js b/scenarios/grpc_car.js index 59cc96c..695a82a 100644 --- a/scenarios/grpc_car.js +++ b/scenarios/grpc_car.js @@ -128,12 +128,17 @@ export function setup() { console.log(`Read rate: ${read_rate}`); console.log(`Writing rate: ${write_rate}`); console.log(`Delete rate: ${delete_rate}`); + + const start_timestamp = Date.now() + console.log(`Load started at: ${Date(start_timestamp).toString()}`) } export function teardown(data) { if (obj_registry) { obj_registry.close(); } + const end_timestamp = Date.now() + console.log(`Load finished at: ${Date(end_timestamp).toString()}`) } export function handleSummary(data) { diff --git a/scenarios/http.js b/scenarios/http.js index 2863fde..77404a4 100644 --- a/scenarios/http.js +++ b/scenarios/http.js @@ -71,12 +71,17 @@ export function setup() { console.log(`Reading VUs: ${read_vu_count}`); console.log(`Writing VUs: ${write_vu_count}`); console.log(`Total VUs: ${total_vu_count}`); + + const start_timestamp = Date.now() + console.log(`Load started at: ${Date(start_timestamp).toString()}`) } export function teardown(data) { if (obj_registry) { obj_registry.close(); } + const end_timestamp = Date.now() + console.log(`Load finished at: ${Date(end_timestamp).toString()}`) } export function handleSummary(data) { diff --git a/scenarios/local.js b/scenarios/local.js index 01496a4..0deb231 100644 --- a/scenarios/local.js +++ b/scenarios/local.js @@ -100,12 +100,17 @@ export function setup() { console.log(`Writing VUs: ${write_vu_count}`); console.log(`Deleting VUs: ${delete_vu_count}`); console.log(`Total VUs: ${total_vu_count}`); + + const start_timestamp = Date.now() + console.log(`Load started at: ${Date(start_timestamp).toString()}`) } export function teardown(data) { if (obj_registry) { obj_registry.close(); } + const end_timestamp = Date.now() + console.log(`Load finished at: ${Date(end_timestamp).toString()}`) } export function handleSummary(data) { diff --git a/scenarios/s3.js b/scenarios/s3.js index 2ca696c..02a65b4 100644 --- a/scenarios/s3.js +++ b/scenarios/s3.js @@ -102,12 +102,17 @@ export function setup() { console.log(`Writing VUs: ${write_vu_count}`); console.log(`Deleting VUs: ${delete_vu_count}`); console.log(`Total VUs: ${total_vu_count}`); + + const start_timestamp = Date.now() + console.log(`Load started at: ${Date(start_timestamp).toString()}`) } export function teardown(data) { if (obj_registry) { obj_registry.close(); } + const end_timestamp = Date.now() + console.log(`Load finished at: ${Date(end_timestamp).toString()}`) } export function handleSummary(data) { diff --git a/scenarios/s3_car.js b/scenarios/s3_car.js index 4d46a45..002ae87 100644 --- a/scenarios/s3_car.js +++ b/scenarios/s3_car.js @@ -129,12 +129,17 @@ export function setup() { console.log(`Read rate: ${read_rate}`); console.log(`Writing rate: ${write_rate}`); console.log(`Delete rate: ${delete_rate}`); + + const start_timestamp = Date.now() + console.log(`Load started at: ${Date(start_timestamp).toString()}`) } export function teardown(data) { if (obj_registry) { obj_registry.close(); } + const end_timestamp = Date.now() + console.log(`Load finished at: ${Date(end_timestamp).toString()}`) } export function handleSummary(data) { diff --git a/scenarios/s3local.js b/scenarios/s3local.js index 4038eed..d09aa80 100644 --- a/scenarios/s3local.js +++ b/scenarios/s3local.js @@ -86,12 +86,17 @@ export function setup() { console.log(`Reading VUs: ${read_vu_count}`); console.log(`Writing VUs: ${write_vu_count}`); console.log(`Total VUs: ${total_vu_count}`); + + const start_timestamp = Date.now() + console.log(`Load started at: ${Date(start_timestamp).toString()}`) } export function teardown(data) { if (obj_registry) { obj_registry.close(); } + const end_timestamp = Date.now() + console.log(`Load finished at: ${Date(end_timestamp).toString()}`) } export function handleSummary(data) {