|
KiCad PCB EDA Suite
|
#include <qa_utils/wx_utils/unit_test_utils.h>#include <geometry/shape_poly_set.h>#include <core/profile.h>#include <nlohmann/json.hpp>#include <algorithm>#include <cmath>#include <filesystem>#include <fstream>#include <map>#include <numeric>#include <sstream>#include <string>#include <vector>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (BenchmarkAllExtractedPolygons) | |
| if (!fs::exists(dataDir)||fs::is_empty(dataDir)) | |
| for (const auto &entry :fs::directory_iterator(dataDir)) | |
| for (const auto &polyFile :polyFiles) | |
| std::ofstream | jsonFile (jsonPath) |
Variables | |
| std::vector< fs::path > | polyFiles |
| int | totalTriangles = 0 |
| int | totalSpikeyTri = 0 |
| int | totalZones = 0 |
| double | totalTimeUs = 0.0 |
| double | totalArea = 0.0 |
| nlohmann::json | boardsJson = nlohmann::json::array() |
| nlohmann::json | globalJson = totalTriangles |
| nlohmann::json | metadataJson = static_cast<int>( polyFiles.size() ) |
| nlohmann::json | jsonOutput = metadataJson |
| fs::path | jsonPath = fs::path( dataDir ) / "triangulation_status.json" |
| BOOST_AUTO_TEST_CASE | ( | BenchmarkAllExtractedPolygons | ) |
Definition at line 607 of file test_triangulation_benchmark.cpp.
References BOOST_AUTO_TEST_CASE(), BOOST_CHECK_MESSAGE(), BOOST_TEST_MESSAGE(), jsonPath, polyFiles, totalSpikeyTri, totalTimeUs, totalTriangles, and totalZones.
| for | ( | const auto &entry | :fs::directory_iteratordataDir | ) |
Definition at line 733 of file test_triangulation_benchmark.cpp.
References polyFiles.
| for | ( | const auto &polyFile :polyFiles | ) |
Definition at line 749 of file test_triangulation_benchmark.cpp.
References boardsJson, polyFiles, totalArea, totalSpikeyTri, totalTimeUs, totalTriangles, and totalZones.
| if | ( | ! | fs::existsdataDir)||fs::is_empty(dataDir | ) |
Definition at line 725 of file test_triangulation_benchmark.cpp.
References BOOST_TEST_MESSAGE().
| std::ofstream jsonFile | ( | jsonPath | ) |
References jsonFile(), jsonOutput, jsonPath, polyFiles, totalTriangles, and totalZones.
| nlohmann::json boardsJson = nlohmann::json::array() |
Definition at line 747 of file test_triangulation_benchmark.cpp.
Referenced by for().
| globalJson["spikey_ratio"] = totalTriangles |
Definition at line 792 of file test_triangulation_benchmark.cpp.
| jsonOutput["boards"] = metadataJson |
Definition at line 805 of file test_triangulation_benchmark.cpp.
Referenced by jsonFile().
Definition at line 810 of file test_triangulation_benchmark.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and jsonFile().
| metadataJson["zone_count"] = static_cast<int>( polyFiles.size() ) |
Definition at line 801 of file test_triangulation_benchmark.cpp.
| std::vector<fs::path> polyFiles |
Definition at line 731 of file test_triangulation_benchmark.cpp.
| double totalArea = 0.0 |
Definition at line 745 of file test_triangulation_benchmark.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_FIXTURE_TEST_CASE(), for(), POLYGON_TRIANGULATION::PartitionAreaFractionsForTesting(), and POLYGON_TRIANGULATION::splitPolygonBalanced().
| int totalSpikeyTri = 0 |
Definition at line 742 of file test_triangulation_benchmark.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and for().
| double totalTimeUs = 0.0 |
Definition at line 744 of file test_triangulation_benchmark.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and for().
| int totalTriangles = 0 |
Definition at line 741 of file test_triangulation_benchmark.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), computeBoardSpikeyRatio(), for(), and jsonFile().
| int totalZones = 0 |
Definition at line 743 of file test_triangulation_benchmark.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), extract_zone_fills_main(), for(), and jsonFile().