Skip to content

Commit

Permalink
scenarios: added terse output of results
Browse files Browse the repository at this point in the history
Signed-off-by: EESergey <[email protected]>
  • Loading branch information
EESergey authored Jul 30, 2024
1 parent 0d3cabc commit 717a9b3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scenarios/grpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,31 @@ export function uuidv4() {
return v.toString(16);
});
}

export function handleSummary(data) {
const neo_ver = (__ENV.NEO_VER || 'Neo_ver_not_set');
const test_type = (__ENV.TEST_TYPE || 'Test_type_not_set');
const run_id = (__ENV.RUN_ID || 'Run_id_not_set');
const test_id = (__ENV.TEST_ID || 'Test_id_not_set');
const size_id = (__ENV.SIZE_ID || 'Size_id_not_set');
const vu_qty = (__ENV.VU_QTY || 'Vu_qty_not_set');
const host_id = (__ENV.HOST_ID || 'Host_id_not_set');
const result_format = (__ENV.RESULT_FORMAT || 'not_set');
const c1 = ~~((data.metrics.data_received.values.rate || '0')/1024/1024);
const c2 = ~~((data.metrics.data_sent.values.rate || '0')/1024/1024);
const c3 = ~~(data.metrics.neofs_obj_get_total && data.metrics.neofs_obj_get_total.values.rate || '0');
const c4 = ~~(data.metrics.neofs_obj_get_duration && data.metrics.neofs_obj_get_duration.values.avg || '0');
const c5 = ~~(data.metrics.neofs_obj_get_duration && data.metrics.neofs_obj_get_duration.values["p(95)"] || '0');
const c6 = ~~(data.metrics.neofs_obj_put_total && data.metrics.neofs_obj_put_total.values.rate || '0');
const c7 = ~~(data.metrics.neofs_obj_put_duration && data.metrics.neofs_obj_put_duration.values.avg || '0');
const c8 = ~~(data.metrics.neofs_obj_put_duration && data.metrics.neofs_obj_put_duration.values["p(95)"] || '0');
const c9 = ~~(data.metrics.neofs_obj_delete_total && data.metrics.neofs_obj_delete_total.values.rate || '0');
const c10 = ~~(data.metrics.neofs_obj_delete_duration && data.metrics.neofs_obj_delete_duration.values.avg || '0');
const c11 = ~~(data.metrics.neofs_obj_delete_duration && data.metrics.neofs_obj_delete_duration.values["p(95)"] || '0');

if (result_format == 'terse') {
return {
stdout: `${neo_ver};${test_type};${run_id};${test_id};${size_id};${vu_qty};${host_id};${run_id}_${test_id}_${size_id}k_${vu_qty}vu_${neo_ver};${c1};${c2};${c3};${c4};${c5};${c6};${c7};${c8};${c9};${c10};${c11}\n`
};
}
}

0 comments on commit 717a9b3

Please sign in to comment.