From f701b58dd0560ae2610254ea5b7a67c4094bc0f7 Mon Sep 17 00:00:00 2001 From: vdimir Date: Tue, 5 Jul 2022 14:24:58 +0200 Subject: [PATCH] Update check_name in performance comparsion upload --- docker/test/performance-comparison/compare.sh | 8 ++++---- tests/ci/performance_comparison_check.py | 17 ++++++++++------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/docker/test/performance-comparison/compare.sh b/docker/test/performance-comparison/compare.sh index f4b4ca31437..5c61a257717 100755 --- a/docker/test/performance-comparison/compare.sh +++ b/docker/test/performance-comparison/compare.sh @@ -1204,7 +1204,7 @@ create table ci_checks engine File(TSVWithNamesAndTypes, 'ci-checks.tsv') as select $PR_TO_TEST :: UInt32 AS pull_request_number, '$SHA_TO_TEST' :: LowCardinality(String) AS commit_sha, - 'Performance' :: LowCardinality(String) AS check_name, + '${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME:-Performance}' :: LowCardinality(String) AS check_name, '$(sed -n 's/.*/\1/p' report.html)' :: LowCardinality(String) AS check_status, -- TODO toDateTime() can't parse output of 'date', so no time for now. (($(date +%s) - $CHPC_CHECK_START_TIMESTAMP) * 1000) :: UInt64 AS check_duration_ms, @@ -1226,15 +1226,15 @@ create table ci_checks engine File(TSVWithNamesAndTypes, 'ci-checks.tsv') select '' test_name, '$(sed -n 's/.*/\1/p' report.html)' test_status, 0 test_duration_ms, - 'https://clickhouse-test-reports.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/performance_comparison/report.html#fail1' report_url + 'https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#fail1' report_url union all select test || ' #' || toString(query_index), 'slower' test_status, 0 test_duration_ms, - 'https://clickhouse-test-reports.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/performance_comparison/report.html#changes-in-performance.' + 'https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#changes-in-performance.' || test || '.' || toString(query_index) report_url from queries where changed_fail != 0 and diff > 0 union all select test || ' #' || toString(query_index), 'unstable' test_status, 0 test_duration_ms, - 'https://clickhouse-test-reports.s3.amazonaws.com/$PR_TO_TEST/$SHA_TO_TEST/performance_comparison/report.html#unstable-queries.' + 'https://s3.amazonaws.com/clickhouse-test-reports/$PR_TO_TEST/$SHA_TO_TEST/${CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX}/report.html#unstable-queries.' || test || '.' || toString(query_index) report_url from queries where unstable_fail != 0 ) diff --git a/tests/ci/performance_comparison_check.py b/tests/ci/performance_comparison_check.py index c2d3597b6c8..baf2593130a 100644 --- a/tests/ci/performance_comparison_check.py +++ b/tests/ci/performance_comparison_check.py @@ -126,6 +126,14 @@ if __name__ == "__main__": logging.info("Check is already finished according to github status, exiting") sys.exit(0) + check_name_prefix = ( + check_name_with_group.lower() + .replace(" ", "_") + .replace("(", "_") + .replace(")", "_") + .replace(",", "_") + ) + docker_image = get_image_with_version(reports_path, IMAGE_NAME) # with RamDrive(ramdrive_path, ramdrive_size): @@ -161,6 +169,8 @@ if __name__ == "__main__": "CLICKHOUSE_PERFORMANCE_COMPARISON_DATABASE_URL": f"{database_url}:9440", "CLICKHOUSE_PERFORMANCE_COMPARISON_DATABASE_USER": database_username, "CLICKHOUSE_PERFORMANCE_COMPARISON_DATABASE_USER_PASSWORD": database_password, + "CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME": check_name_with_group, + "CLICKHOUSE_PERFORMANCE_COMPARISON_CHECK_NAME_PREFIX": check_name_prefix, } ) @@ -186,13 +196,6 @@ if __name__ == "__main__": "runlog.log": run_log_path, } - check_name_prefix = ( - check_name_with_group.lower() - .replace(" ", "_") - .replace("(", "_") - .replace(")", "_") - .replace(",", "_") - ) s3_prefix = f"{pr_info.number}/{pr_info.sha}/{check_name_prefix}/" s3_helper = S3Helper("https://s3.amazonaws.com") uploaded = {} # type: Dict[str, str]