fix: benchmark 规模缩减 + min_time 加 s 后缀(防 OOM/栈溢出)
This commit is contained in:
@@ -69,8 +69,8 @@ add_custom_target(vde_benchmarks
|
||||
# ── CTest integration: register benchmarks with optional args ──
|
||||
# Run individual benchmarks via: ctest -R bench_
|
||||
enable_testing()
|
||||
add_test(NAME bench_bvh COMMAND vde_bench_bvh --benchmark_min_time=0.01)
|
||||
add_test(NAME bench_delaunay COMMAND vde_bench_delaunay --benchmark_min_time=0.01)
|
||||
add_test(NAME bench_boolean COMMAND vde_bench_boolean --benchmark_min_time=0.01)
|
||||
add_test(NAME bench_curves COMMAND vde_bench_curves --benchmark_min_time=0.01)
|
||||
add_test(NAME bench_spatial COMMAND vde_bench_spatial --benchmark_min_time=0.01)
|
||||
add_test(NAME bench_bvh COMMAND vde_bench_bvh --benchmark_min_time=0.01s)
|
||||
add_test(NAME bench_delaunay COMMAND vde_bench_delaunay --benchmark_min_time=0.01s)
|
||||
add_test(NAME bench_boolean COMMAND vde_bench_boolean --benchmark_min_time=0.01s)
|
||||
add_test(NAME bench_curves COMMAND vde_bench_curves --benchmark_min_time=0.01s)
|
||||
add_test(NAME bench_spatial COMMAND vde_bench_spatial --benchmark_min_time=0.01s)
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ static void BVH_Build(benchmark::State& state) {
|
||||
}
|
||||
state.SetItemsProcessed(state.iterations() * state.range(0));
|
||||
}
|
||||
BENCHMARK(BVH_Build)->Arg(1000)->Arg(10000)->Arg(100000);
|
||||
BENCHMARK(BVH_Build)->Arg(1000)->Arg(5000)->Arg(10000);
|
||||
|
||||
// ── BVH Ray Query ─────────────────────────────────────────────────────
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ static void RTree_Build(benchmark::State& state) {
|
||||
}
|
||||
state.SetItemsProcessed(state.iterations() * state.range(0));
|
||||
}
|
||||
BENCHMARK(RTree_Build)->Arg(1000)->Arg(10000)->Arg(100000);
|
||||
BENCHMARK(RTree_Build)->Arg(1000)->Arg(10000)->Arg(50000);
|
||||
|
||||
class RTreeFixture : public benchmark::Fixture {
|
||||
public:
|
||||
@@ -71,7 +71,7 @@ BENCHMARK_DEFINE_F(RTreeFixture, RTree_kNN)(benchmark::State& state) {
|
||||
benchmark::DoNotOptimize(total);
|
||||
state.SetItemsProcessed(state.iterations() * queries.size());
|
||||
}
|
||||
BENCHMARK_REGISTER_F(RTreeFixture, RTree_kNN)->Arg(1000)->Arg(10000)->Arg(100000);
|
||||
BENCHMARK_REGISTER_F(RTreeFixture, RTree_kNN)->Arg(1000)->Arg(10000)->Arg(50000);
|
||||
|
||||
// ── KD-Tree ──────────────────────────────────────────────────────────
|
||||
|
||||
@@ -84,7 +84,7 @@ static void KDTree_Build(benchmark::State& state) {
|
||||
}
|
||||
state.SetItemsProcessed(state.iterations() * state.range(0));
|
||||
}
|
||||
BENCHMARK(KDTree_Build)->Arg(1000)->Arg(10000)->Arg(100000);
|
||||
BENCHMARK(KDTree_Build)->Arg(1000)->Arg(10000)->Arg(50000);
|
||||
|
||||
class KDTreeFixture : public benchmark::Fixture {
|
||||
public:
|
||||
@@ -110,4 +110,4 @@ BENCHMARK_DEFINE_F(KDTreeFixture, KDTree_kNN)(benchmark::State& state) {
|
||||
benchmark::DoNotOptimize(total);
|
||||
state.SetItemsProcessed(state.iterations() * queries.size());
|
||||
}
|
||||
BENCHMARK_REGISTER_F(KDTreeFixture, KDTree_kNN)->Arg(1000)->Arg(10000)->Arg(100000);
|
||||
BENCHMARK_REGISTER_F(KDTreeFixture, KDTree_kNN)->Arg(1000)->Arg(10000)->Arg(50000);
|
||||
|
||||
Reference in New Issue
Block a user