From 5b1793f248155569bf03844837dcadab91d42486 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 3bf351d..e39bc19 100644 --- a/scenarios/grpc.js +++ b/scenarios/grpc.js @@ -119,12 +119,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 6271ec6..89bdc22 100644 --- a/scenarios/grpc_car.js +++ b/scenarios/grpc_car.js @@ -143,12 +143,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 0be4e05..110e097 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 1568dc1..aeec2d9 100644 --- a/scenarios/s3.js +++ b/scenarios/s3.js @@ -116,12 +116,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 262e0fc..0cc8297 100644 --- a/scenarios/s3_car.js +++ b/scenarios/s3_car.js @@ -143,12 +143,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 7eb960b..aa9b54d 100644 --- a/scenarios/s3local.js +++ b/scenarios/s3local.js @@ -98,12 +98,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) {