Merge branch 'master' into sf-optimise-geospatial-query

This commit is contained in:
Siarhei Fedartsou 2024-05-20 11:18:20 +02:00
commit 38e95b4517
3 changed files with 13 additions and 18 deletions

View File

@ -151,7 +151,7 @@ jobs:
- name: gcc-13-debug-cov
continue-on-error: false
node: 20
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Debug
CCOMPILER: gcc-13
@ -248,7 +248,7 @@ jobs:
- name: gcc-13-release
continue-on-error: false
node: 20
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
BUILD_TOOLS: ON
BUILD_TYPE: Release
CCOMPILER: gcc-13

View File

@ -71,9 +71,9 @@ def main():
benchmark_results = collect_benchmark_results(base_folder, pr_folder)
pr_details = get_pr_details(REPO_OWNER, REPO_NAME, PR_NUMBER)
pr_body = pr_details.get('body', '')
# in both cases when there is no PR body or PR body is None fallback to empty string
pr_body = pr_details.get('body', '') or ''
markdown_table = create_markdown_table(benchmark_results)
new_benchmark_section = f"<!-- BENCHMARK_RESULTS_START -->\n## Benchmark Results\n{markdown_table}\n<!-- BENCHMARK_RESULTS_END -->"
@ -85,7 +85,7 @@ def main():
flags=re.DOTALL
)
else:
updated_body = f"{pr_body}\n\n{new_benchmark_section}"
updated_body = f"{pr_body}\n\n{new_benchmark_section}" if len(pr_body) > 0 else new_benchmark_section
update_pr_description(REPO_OWNER, REPO_NAME, PR_NUMBER, updated_body)
print("PR description updated successfully.")

View File

@ -12,7 +12,6 @@
#include <boost/assert.hpp>
#include <boost/optional/optional.hpp>
#include <cstdlib>
#include <exception>
#include <iostream>
@ -215,18 +214,15 @@ try
FloatCoordinate{FloatLongitude{7.415513992309569}, FloatLatitude{43.73347615145474}});
params.coordinates.push_back(
FloatCoordinate{FloatLongitude{7.415342330932617}, FloatLatitude{43.733251335381205}});
for (size_t index = 0; index < params.coordinates.size(); ++index)
{
params.radiuses.emplace_back();
}
auto run_benchmark = [&](std::optional<double> radiusInMeters)
{
params.radiuses = {};
if (radiusInMeters)
{
for (auto &radius : params.radiuses)
for (size_t index = 0; index < params.coordinates.size(); ++index)
{
radius = *radiusInMeters;
params.radiuses.emplace_back(*radiusInMeters);
}
}
@ -258,11 +254,10 @@ try
<< std::endl;
};
run_benchmark(std::nullopt);
run_benchmark(5.0);
run_benchmark(10.0);
run_benchmark(15.0);
run_benchmark(30.0);
for (auto radius : std::vector<std::optional<double>>{std::nullopt, 5.0, 10.0, 15.0, 30.0})
{
run_benchmark(radius);
}
return EXIT_SUCCESS;
}
@ -270,4 +265,4 @@ catch (const std::exception &e)
{
std::cerr << "Error: " << e.what() << std::endl;
return EXIT_FAILURE;
}
}