forked from valhalla/valhalla
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds gbench microbenchmarking library; example mapmatch benchmark. (v…
…alhalla#2222) * Adds gbench microbenchmarking library; example mapmatch benchmark. - Adds a CMake support for Google Benchmark (aka, 'gbench') for performing highly-configurable microbenchmarking. This library provides standardize benchmark runners and reporting, which we can use in the future for tracking regressions on releases. - Adds an example of using gbench for the mapmatching module, which currently lacks any CPU or latency benchmarks.
- Loading branch information
Buro Mookerji
authored
Apr 21, 2020
1 parent
db13688
commit 1c4a4f0
Showing
16 changed files
with
479 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
add_subdirectory(${VALHALLA_SOURCE_DIR}/third_party/benchmark | ||
${CMAKE_BINARY_DIR}/benchmark) | ||
|
||
# Custom targets building and running all microbenchmarks in the project | ||
add_custom_target(benchmarks) | ||
add_custom_target(run-benchmarks) | ||
|
||
# Benchmarks generally require utrecht test tiles to be present, so add this dependency by default. | ||
add_dependencies(benchmarks utrecht_tiles) | ||
|
||
# Macro for defining Google Benchmark microbenchmark targets | ||
macro (add_valhalla_benchmark target_file) | ||
set(target_name benchmark-${target_file}) | ||
add_executable(${target_name} ${target_file}.cc) | ||
set_target_properties(${target_name} | ||
PROPERTIES | ||
COMPILE_DEFINITIONS | ||
VALHALLA_SOURCE_DIR="${VALHALLA_SOURCE_DIR}/") | ||
target_link_libraries(${target_name} valhalla benchmark::benchmark) | ||
add_dependencies(benchmarks ${target_name}) | ||
# Add a custom target running the benchmark | ||
add_custom_target(run-${target_name} | ||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${target_name} | ||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | ||
COMMENT "Running ${target_name} in ${CMAKE_CURRENT_BINARY_DIR}" | ||
DEPENDS ${target_name}) | ||
add_dependencies(run-benchmarks run-${target_name}) | ||
endmacro() | ||
|
||
add_subdirectory(meili) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_valhalla_benchmark(mapmatch) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
{ | ||
"mjolnir": { | ||
"tile_dir": "test/data/utrecht_tiles", | ||
"concurrency": 1 | ||
}, | ||
"loki": { | ||
"actions": [ | ||
"route", | ||
"sources_to_targets", | ||
"trace_route", | ||
"trace_attributes" | ||
], | ||
"logging": { | ||
"long_request": 100 | ||
}, | ||
"service_defaults": { | ||
"minimum_reachability": 50, | ||
"radius": 0, | ||
"search_cutoff": 35000, | ||
"node_snap_tolerance": 5, | ||
"street_side_tolerance": 5, | ||
"heading_tolerance": 60 | ||
} | ||
}, | ||
"thor": { | ||
"logging": { | ||
"long_request": 110 | ||
} | ||
}, | ||
"skadi": { | ||
"actons": [ | ||
"height" | ||
], | ||
"logging": { | ||
"long_request": 5 | ||
} | ||
}, | ||
"meili": { | ||
"customizable": [ | ||
"turn_penalty_factor", | ||
"max_route_distance_factor", | ||
"max_route_time_factor", | ||
"search_radius" | ||
], | ||
"mode": "auto", | ||
"grid": { | ||
"cache_size": 100240, | ||
"size": 500 | ||
}, | ||
"default": { | ||
"beta": 3, | ||
"breakage_distance": 2000, | ||
"geometry": false, | ||
"gps_accuracy": 5, | ||
"interpolation_distance": 10, | ||
"max_route_distance_factor": 5, | ||
"max_route_time_factor": 5, | ||
"max_search_radius": 200, | ||
"route": true, | ||
"search_radius": 15, | ||
"sigma_z": 4.07, | ||
"turn_penalty_factor": 200 | ||
} | ||
}, | ||
"service_limits": { | ||
"auto": { | ||
"max_distance": 5000000, | ||
"max_locations": 20, | ||
"max_matrix_distance": 400000, | ||
"max_matrix_locations": 50 | ||
}, | ||
"auto_shorter": { | ||
"max_distance": 5000000, | ||
"max_locations": 20, | ||
"max_matrix_distance": 400000, | ||
"max_matrix_locations": 50 | ||
}, | ||
"isochrone": { | ||
"max_contours": 4, | ||
"max_distance": 25000, | ||
"max_locations": 1, | ||
"max_time": 120 | ||
}, | ||
"max_avoid_locations": 50, | ||
"max_radius": 200, | ||
"max_reachability": 100, | ||
"max_alternates": 2, | ||
"multimodal": { | ||
"max_distance": 500000, | ||
"max_locations": 50, | ||
"max_matrix_distance": 0, | ||
"max_matrix_locations": 0 | ||
}, | ||
"pedestrian": { | ||
"max_distance": 250000, | ||
"max_locations": 50, | ||
"max_matrix_distance": 200000, | ||
"max_matrix_locations": 50, | ||
"max_transit_walking_distance": 10000, | ||
"min_transit_walking_distance": 1 | ||
}, | ||
"skadi": { | ||
"max_shape": 750000, | ||
"min_resample": 10 | ||
}, | ||
"trace": { | ||
"max_distance": 200000, | ||
"max_gps_accuracy": 100, | ||
"max_search_radius": 100, | ||
"max_shape": 16000, | ||
"max_best_paths": 4, | ||
"max_best_paths_shape": 100 | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
{ | ||
"costing": "auto", | ||
"format": "osrm", | ||
"shape_match": "map_snap", | ||
"shape": [ | ||
{ | ||
"lon": 5.08531221, | ||
"lat": 52.0938563, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0865867, | ||
"lat": 52.0930211, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.08769141, | ||
"lat": 52.0923946, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0896245, | ||
"lat": 52.0912591, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0909416, | ||
"lat": 52.090737, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0926623, | ||
"lat": 52.0905021, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0946379, | ||
"lat": 52.090737, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0961035, | ||
"lat": 52.0907892, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.097442, | ||
"lat": 52.0909328, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.09884401, | ||
"lat": 52.09115474, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.100416, | ||
"lat": 52.0913244, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.101733, | ||
"lat": 52.09137664, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.1034112, | ||
"lat": 52.0915854, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.10351751, | ||
"lat": 52.09202915, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.102345, | ||
"lat": 52.0929627, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0959337, | ||
"lat": 52.093477899999996, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0932129, | ||
"lat": 52.0939153, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.08858141, | ||
"lat": 52.094623799999994, | ||
"type": "break" | ||
}, | ||
{ | ||
"lon": 5.0858904, | ||
"lat": 52.0958159, | ||
"type": "break" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"costing": "auto", | ||
"format": "osrm", | ||
"shape_match": "map_snap", | ||
"shape": [ | ||
{ | ||
"lat": 52.0981267, | ||
"lon": 5.129618, | ||
"type": "break" | ||
}, | ||
{ | ||
"lat": 52.098128, | ||
"lon": 5.129725, | ||
"type": "break" | ||
} | ||
] | ||
} |
Oops, something went wrong.