This commit is contained in:
Amaury Chamayou 2023-11-08 13:04:06 +00:00 коммит произвёл GitHub
Родитель 6e0f67501f
Коммит 99767c7391
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 13 удалений

Просмотреть файл

@ -33,11 +33,9 @@ jobs:
- script: |
set -ex
python3.8 -m venv env
source env/bin/activate
python -m pip install -r requirements.txt
ls ../tla/*.json
python3 upload_tlc_stats.py 3node_fixed ../tla/MCccfraft_stats.json
./cimetrics_env.sh python upload_tlc_stats.py 3node_fixed ../tla/MCccfraft_stats.json
./cimetrics_env.sh python upload_tlc_stats.py atomic_reconfig ../tla/MCccfraftAtomicReconfig_stats.json
./cimetrics_env.sh python upload_tlc_stats.py reconfig ../tla/MCccfraftWithReconfig_stats.json
env:
METRICS_MONGO_CONNECTION: $(METRICS_MONGO_CONNECTION)
workingDirectory: tests

Просмотреть файл

@ -6,8 +6,6 @@ import os
import argparse
import cimetrics.upload
from loguru import logger as LOG
def run(test_label, filename):
if os.path.exists(filename):
@ -15,18 +13,15 @@ def run(test_label, filename):
data = json.load(f)
duration_sec = data["duration"]
dstates = data["distinct"]
LOG.info(
"Uploading metrics for {} - duration: {}, distinct states: {}",
test_label,
duration_sec,
dstates,
print(
f"Uploading metrics for {test_label} - duration: {duration_sec}, distinct states: {dstates}"
)
with cimetrics.upload.metrics(complete=False) as metrics:
metrics.put(f"tlc_{test_label}_duration_s", duration_sec)
metrics.put(f"tlc_{test_label}_states", dstates)
else:
LOG.warning(f"Could not find file {filename}: skipping metrics upload")
print(f"Could not find file {filename}: skipping metrics upload")
if __name__ == "__main__":