moved all files to subproject

This commit is contained in:
alex
2023-09-06 15:49:19 +02:00
parent 83dfdf7841
commit 1069348d71
7 changed files with 0 additions and 0 deletions

76
ceph_bench/run.py Normal file
View File

@@ -0,0 +1,76 @@
# copyright: Canonical
"Run the bench cases (remote to local)."
import json
import click
from benchmark import run_single_bench
from definitions import (
BENCH_DIR_NAMES,
CEPH_ROOT,
INST_STO_ROOT,
NUM_RUNS,
REMOTE_INST_STO_ROOT,
SERV_URL,
)
from results_tools import Results
results = Results()
@click.group()
def cli():
pass
@cli.command()
def local():
click.echo("Running locally")
for runnum in range(NUM_RUNS):
for files_type in BENCH_DIR_NAMES:
test_case = "Local-InsSto to CEPH"
source = f"{INST_STO_ROOT}/{files_type}"
target = CEPH_ROOT + files_type
run_single_bench(
runnum,
test_case,
files_type,
source,
target,
)
@cli.command()
def distant():
click.echo("Running distant to local")
for runnum in range(NUM_RUNS):
for files_type in BENCH_DIR_NAMES:
test_case = "Distant-InsSto to InsSto"
source = f"{SERV_URL}/{REMOTE_INST_STO_ROOT}/{files_type}"
target = INST_STO_ROOT + files_type
run_single_bench(
runnum,
test_case,
files_type,
source,
target,
)
test_case = "Distant-InsSto to CEPH"
source = f"{SERV_URL}/{REMOTE_INST_STO_ROOT}/{files_type}"
target = CEPH_ROOT + files_type
run_single_bench(
runnum,
test_case,
files_type,
source,
target,
results,
)
if __name__ == "__main__":
cli()
json.dump(results.result_list, open("results.json", "w"))
results.save_to_csv()