Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AUTO-BACKPORT release-0.38.0] 10218: ci: perf test results will be stored as CircleCI artifacts only #10223

Open
wants to merge 1 commit into
base: release-0.38.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions performance/daist/daist/models/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,42 +31,6 @@ def get_filename(self, tags: Optional[Iterable[str]] = None,
fmt: Format.type_ = Format.TXT) -> Path:
return super().get_filename(fmt, tags=tags)

def upload(self):
conn = psycopg2.connect(f'dbname={self.DB_NAME} '
f'user={environment.perf_result_db_user} '
f'password={environment.secrets.perf_result_db_pass} '
f'host={environment.perf_result_db_host}')

for run_row in self._perf_test_runs_table:
with conn.cursor() as cursor:
query = sql.SQL(f'INSERT INTO {self.Table.PERF_TEST_RUNS} (commit, branch) '
'VALUES ({commit}, {branch}) '
'RETURNING id;').format(
commit=sql.Literal(run_row.commit),
branch=sql.Literal(run_row.branch))
cursor.execute(query)
run_id = cursor.fetchone()[0]

for row in self._perf_tests_table:
query = sql.SQL(
f'INSERT INTO {self.Table.PERF_TESTS} '
'(test_name, run_id, avg, min, med, max, p90, p95, passes, fails) '
'VALUES ({test_name}, {run_id}, {avg}, {min}, {med}, {max}, {p90}, '
'{p95}, {passes}, {fails});').format(
test_name=sql.Literal(row.test_name),
run_id=sql.Literal(run_id),
avg=sql.Literal(row.avg),
min=sql.Literal(row.min),
med=sql.Literal(row.med),
max=sql.Literal(row.max),
p90=sql.Literal(row.p90),
p95=sql.Literal(row.p95),
passes=sql.Literal(row.passes),
fails=sql.Literal(row.fails),
)
cursor.execute(query)
conn.commit()

def __str__(self):
return '\n'.join([f'{self._perf_test_runs_table.get_qualname()}:',
str(self._perf_test_runs_table),
Expand Down
7 changes: 0 additions & 7 deletions performance/daist/daist/rest_api/test_locust.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,6 @@ def _save_to_results(self, locust_stats: List[StatsEntry],
file_meta = FileMeta()
file_meta.test_id = self.id()
session.result.add_obj(perf_tests_run, perf_tests_run.get_filename(tags=(tag,)), file_meta)
if environment.secrets.perf_result_db_pass is not None:
logger.info(f'Uploading {self.id()} results.')
try:
perf_tests_run.upload()
except Exception as err:
logger.exception(f'Failed to upload {self.id()} results.')
raise err

def test(self):
self._runner.start(self._USERS, spawn_rate=self._USERS)
Expand Down
65 changes: 0 additions & 65 deletions performance/daist/uts/models/test_db.py

This file was deleted.