[#91] Failover enhancements
Signed-off-by: Andrey Berezin <a.berezin@yadro.com>
This commit is contained in:
parent
9feb8135e3
commit
98ccd4c382
16 changed files with 200 additions and 56 deletions
|
@ -2,7 +2,6 @@ from datetime import datetime
|
|||
from typing import Optional
|
||||
|
||||
import yaml
|
||||
import os
|
||||
|
||||
from frostfs_testlib.load.load_config import K6ProcessAllocationStrategy, LoadParams, LoadScenario
|
||||
from frostfs_testlib.load.load_metrics import get_metrics_object
|
||||
|
@ -110,7 +109,7 @@ class LoadReport:
|
|||
total_rate: float,
|
||||
throughput: float,
|
||||
errors: dict[str, int],
|
||||
latency: dict[str, dict],
|
||||
latency: dict[str, dict],
|
||||
):
|
||||
throughput_html = ""
|
||||
if throughput > 0:
|
||||
|
@ -131,12 +130,16 @@ class LoadReport:
|
|||
|
||||
latency_html = ""
|
||||
if latency:
|
||||
for node_key, param_dict in latency.items():
|
||||
latency_values = ""
|
||||
for param_name, param_val in param_dict.items():
|
||||
latency_values += f"{param_name}={param_val:.2f}ms "
|
||||
for node_key, latency_dict in latency.items():
|
||||
latency_values = "N/A"
|
||||
if latency_dict:
|
||||
latency_values = ""
|
||||
for param_name, param_val in latency_dict.items():
|
||||
latency_values += f"{param_name}={param_val:.2f}ms "
|
||||
|
||||
latency_html += self._row(f"Put latency {node_key.split(':')[0]}", latency_values)
|
||||
latency_html += self._row(
|
||||
f"{operation_type} latency {node_key.split(':')[0]}", latency_values
|
||||
)
|
||||
|
||||
object_size, object_size_unit = calc_unit(self.load_params.object_size, 1)
|
||||
duration = self._seconds_to_formatted_duration(self.load_params.load_time)
|
||||
|
@ -145,8 +148,8 @@ class LoadReport:
|
|||
short_summary = f"{operation_type} {object_size}{object_size_unit} {duration} {requested_rate_str} {vus_str} {model} - {throughput:.2f}{unit}/s {total_rate:.2f}/s"
|
||||
errors_percent = 0
|
||||
if total_operations:
|
||||
errors_percent = total_errors/total_operations*100.0
|
||||
|
||||
errors_percent = total_errors / total_operations * 100.0
|
||||
|
||||
html = f"""
|
||||
<table border="1" cellpadding="5px"><tbody>
|
||||
<tr><th colspan="2" bgcolor="gainsboro">{short_summary}</th></tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue