Сохранять из логов прогона только изменения состояния балансировщика и реплик, сжимать посекундные метрики
This commit is contained in:
@@ -20,6 +20,7 @@ under 1 % errors, p99 of successful requests within 500 ms). Charts show the
|
||||
median of the repeats; a hollow marker means the generator fell behind.
|
||||
"""
|
||||
import csv
|
||||
import gzip
|
||||
import json
|
||||
import pathlib
|
||||
import statistics
|
||||
@@ -40,10 +41,15 @@ COMPONENTS = ("api", "lb", "postgres", "valkey", "loadgen")
|
||||
|
||||
|
||||
def read_jsonl(path):
|
||||
if not path.exists():
|
||||
packed = path.with_name(path.name + ".gz")
|
||||
if packed.exists():
|
||||
text = gzip.decompress(packed.read_bytes()).decode("utf-8")
|
||||
elif path.exists():
|
||||
text = path.read_text(encoding="utf-8")
|
||||
else:
|
||||
return []
|
||||
rows = []
|
||||
for line in path.read_text(encoding="utf-8").splitlines():
|
||||
for line in text.splitlines():
|
||||
line = line.strip()
|
||||
if line:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user